<?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 Hassan Zaid on Medium]]></title>
        <description><![CDATA[Stories by Hassan Zaid on Medium]]></description>
        <link>https://medium.com/@hassanzaid?source=rss-ee8c05de556e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*wH2OiWzCxR0Z53nLzWKRSw.jpeg</url>
            <title>Stories by Hassan Zaid on Medium</title>
            <link>https://medium.com/@hassanzaid?source=rss-ee8c05de556e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 13:51:46 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@hassanzaid/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[Beyond Survival Mode: The Transition from Endurance to Intentionality]]></title>
            <link>https://hassanzaid.medium.com/beyond-survival-mode-the-transition-from-endurance-to-intentionality-f7adf1d72892?source=rss-ee8c05de556e------2</link>
            <guid isPermaLink="false">https://medium.com/p/f7adf1d72892</guid>
            <category><![CDATA[spirituality]]></category>
            <category><![CDATA[resilience]]></category>
            <category><![CDATA[psychology]]></category>
            <category><![CDATA[personal-development]]></category>
            <category><![CDATA[self-awareness]]></category>
            <dc:creator><![CDATA[Hassan Zaid]]></dc:creator>
            <pubDate>Mon, 02 Nov 2026 23:26:34 GMT</pubDate>
            <atom:updated>2026-11-02T23:26:34.917Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hf8kOKia86W8-ojo" /><figcaption>Photo by <a href="https://unsplash.com/@greedwolf97?utm_source=medium&amp;utm_medium=referral">Quan Jing</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Resilience teaches us how to endure difficult circumstances. Wisdom teaches us when to stop building a life around them.</p><p>In engineering, we spend an extraordinary amount of time designing systems that can withstand failure. We measure fault tolerance, build failover mechanisms, anticipate disruptions and optimise for resilience under load.</p><p>But when we apply that same architecture to human life, a subtle danger emerges: we become so proficient at surviving difficult conditions that we mistake our ability to endure them for a reason to remain in them.</p><p>For years, I measured personal growth largely through endurance. Whether stepping into engineering leadership without a safety net, navigating demanding professional environments, or finding my footing through personal losses and unexpected transitions, my instinct was consistent: identify the failure points, understand what went wrong, adapt and keep moving.</p><p>There was always another problem to solve, another responsibility to assume. For a long time, I called that resilience.</p><p>But a recent reflection brought an uncomfortable distinction into focus:</p><p>The ability to survive difficult circumstances is not evidence that those circumstances are where you belong.</p><p>Resilience is an invaluable capacity. But by itself, it is a poor long-term strategy for designing a fulfilling life.</p><p>At some point, the objective must change. It cannot always be about becoming better at surviving the conditions we find ourselves in. Sometimes, it must be about questioning the conditions themselves.</p><p><strong>The Trap of High-Friction Environments</strong></p><p>When analysis and perseverance become our primary coping mechanisms, the mind begins operating like a continuous debugging process.</p><p>Every setback becomes a diagnostic exercise. Every disappointment demands an explanation. Every uncertainty becomes another variable to account for.</p><p>This makes us resourceful, dependable and capable of functioning where others might struggle. But it carries costs that are not immediately visible.</p><p><strong>Self-awareness can become self-interrogation</strong>.</p><p>Reflection asks what happened, what can be learned and what might be done differently. Self-interrogation keeps reopening the same investigation, searching for some overlooked mistake that might explain the discomfort.</p><p>Eventually, the internal dialogue becomes a courtroom in which you are prosecutor, defence and judge.</p><p>Not every experience requires another investigation. Some things need to be acknowledged, felt and released.</p><p><strong>Endurance can become an identity</strong>.</p><p>When you spend enough time in difficult environments, you begin to associate struggle with significance.</p><p>You become the person who figures things out, absorbs pressure and finds a way forward, and over time that becomes part of how you understand your own worth.</p><p>You start measuring an experience by how much it demands of you rather than what it allows you to become.</p><p>But the fact that you can tolerate something does not mean it deserves your continued participation.</p><p><strong>The need for control can disguise itself as responsibility.</strong></p><p>For people accustomed to solving problems, uncertainty feels like an unresolved issue. We try to anticipate every outcome and manage every variable.</p><p>Yet life is not a system whose behaviour can be fully understood through sufficient analysis.</p><p>This is where Tawakkul offers an important perspective.</p><p>Reliance upon Allah does not negate effort, planning or responsibility; it places them within their proper limits.</p><p>We are responsible for taking the means available to us, making considered decisions and acting with sincerity. We are not responsible for controlling every outcome.</p><p>There is a difference between steering the boat and attempting to control the ocean.</p><p>Tawakkul is not passivity. Effort belongs to us; the ultimate outcome does not.</p><p>Perhaps part of maturity is learning to act decisively without becoming psychologically imprisoned by the need for certainty.</p><p><strong>From Getting Back Up to Choosing What to Build</strong></p><p>The turning point comes when you realise you no longer need to keep demonstrating how much pressure you can withstand.</p><p>Surviving demonstrates resilience, but spending your entire life proving it can prevent you from building something that lets you flourish.</p><p>The question gradually changes from:</p><p>How much more can I handle?</p><p>To:</p><p>What is actually worth my energy?</p><p>For me, this involves three shifts.</p><p>1.<strong> Responsibility, Not Self-Sacrifice</strong></p><p>Responsibility means honouring commitments, providing where necessary, treating people fairly and owning what genuinely falls within our obligations.</p><p>Self-sacrifice begins when we assume responsibilities that are not ours, compromise our well-being to satisfy external expectations, or hold ourselves accountable for things beyond our control.</p><p>There is a difference between being dependable and making yourself indispensable at your own expense.</p><p>Not every problem requires your intervention, and not every burden is yours to carry.</p><p>Learning this does not make us less responsible. It makes our responsibility more deliberate.</p><p>2. <strong>Sustainable Growth Over Unnecessary Friction</strong></p><p>Growth requires discomfort. But not all friction is productive.</p><p>Being stretched by a meaningful challenge develops capacity; continually compensating for a dysfunctional environment depletes it.</p><p>Sometimes growth means staying and doing the difficult work. Sometimes it means recognising that your abilities are underused, your values are misaligned with your environment, or the cost of remaining has become disproportionate to what you gain.</p><p>Walking away is not always avoidance. Sometimes it is discernment.</p><p>The objective is not a life without challenges, but to stop confusing unnecessary suffering with meaningful progress.</p><p>3. <strong>From Survival to Intentionality</strong></p><p>When survival is your default orientation, your energy is reactive: you respond, recover, adjust and brace for whatever comes next.</p><p>Intentionality changes that.</p><p>Instead of constantly repairing what is broken, you begin designing what you want to sustain.</p><p>You become conscious of where your time goes, which relationships deserve your investment, and which environments allow you to grow.</p><p>It also means accepting that a meaningful life does not have to be constantly dramatic or extraordinary.</p><p>There is value in stability, in ordinary days, in meaningful work that does not consume your identity, in relationships that do not require constant emotional negotiation, in having room to think, create, worship, rest and simply exist.</p><p>Perhaps we underestimate how much courage it takes to choose a quieter, more sustainable kind of ambition.</p><p>The engineer in us wants to solve problems. Eventually, we must direct that instinct towards designing systems that stop producing the same problems.</p><p><strong>The Architecture of Trust</strong></p><p>We often behave as though peace is something we will earn once every variable is accounted for and every threat neutralised.</p><p>But certainty is an impossible prerequisite for peace.</p><p>Life will keep introducing circumstances we did not anticipate and decisions whose consequences we cannot predict.</p><p>Our responsibility is to act with wisdom, make the best decisions available and remain open to what unfolds.</p><p>This is where faith becomes more than comfort; it becomes a framework for living.</p><p>To trust Allah is not to abandon intention, but to recognise the limits of our agency without abandoning the responsibilities that belong to us.</p><p>We can pursue something wholeheartedly without making our self-worth dependent on obtaining it.</p><p>We can make difficult decisions without demanding immediate reassurance that they were right.</p><p>We can sit with uncertainty without reading it as proof that we have lost our way.</p><p>Sometimes, surrender is not the absence of action. It is the absence of the illusion that everything depends on us.</p><p><strong>The Takeaway: Resilience Should Give Way to Wisdom</strong></p><p>If you find yourself constantly navigating chaos, or taking pride in how much pressure you can withstand, perhaps it is worth asking:</p><p>Am I building something meaningful, or have I become so accustomed to surviving that I no longer question what I am surviving for?</p><p>Resilience will always matter. There will be seasons that demand extraordinary perseverance and responsibilities that cannot be abandoned.</p><p>But resilience should be a resource we draw upon, not an identity we are compelled to maintain.</p><p>The ultimate expression of resilience may not be becoming indestructible, but developing the wisdom to recognise what is worth enduring, what needs to change and what must finally be released.</p><p>I no longer want to measure my life by how effectively I recover from disruption.</p><p>I want to measure it by the quality of what I am deliberately building: the work I choose, the relationships I nurture, the responsibilities I honour, the faith I cultivate and the peace I allow myself to experience.</p><p>I am not interested in becoming better at surviving a life I have never stopped to question. I want to become more intentional about the life I am creating.</p><p>Because you are not defined merely by your ability to keep getting back up.</p><p>You deserve a life in which you do not always have to.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f7adf1d72892" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Legacy Logic : Debugging the Human Operating System]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-snippet">Imagine waking up to discover that your internal software was compiled in 2012, running on patched-up legacy logic, and crashing every&#x2026;</p><p class="medium-feed-link"><a href="https://hassanzaid.medium.com/legacy-logic-debugging-the-human-operating-system-02e82fc466a7?source=rss-ee8c05de556e------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://hassanzaid.medium.com/legacy-logic-debugging-the-human-operating-system-02e82fc466a7?source=rss-ee8c05de556e------2</link>
            <guid isPermaLink="false">https://medium.com/p/02e82fc466a7</guid>
            <category><![CDATA[psychology]]></category>
            <category><![CDATA[personal-development]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[technology]]></category>
            <dc:creator><![CDATA[Hassan Zaid]]></dc:creator>
            <pubDate>Fri, 02 Oct 2026 17:19:39 GMT</pubDate>
            <atom:updated>2026-10-02T17:19:39.994Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[I’ve been MIA for a few months.]]></title>
            <link>https://hassanzaid.medium.com/ive-been-mia-for-a-few-months-e7d28fbfe19a?source=rss-ee8c05de556e------2</link>
            <guid isPermaLink="false">https://medium.com/p/e7d28fbfe19a</guid>
            <dc:creator><![CDATA[Hassan Zaid]]></dc:creator>
            <pubDate>Tue, 22 Sep 2026 22:27:24 GMT</pubDate>
            <atom:updated>2026-09-22T22:27:24.129Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*hv0hMG0EzTjTGqpm0um4qA.jpeg" /></figure><p>I’ve been MIA for a few months.</p><p>No blog posts. No life updates. No inspirational quotes mysteriously appearing on your timeline at 6:03 a.m.</p><p>Nothing.</p><p>I basically disappeared from the internet like a software engineer who has just pushed to production on Friday and decided to “take a short break.” 😂</p><p>But I’m back.</p><p>And after months of thinking, overthinking, underthinking, and occasionally staring at the ceiling like it contains the source code to my life, I’ve made an important discovery.</p><p><strong>Apparently, I’m weird.</strong></p><p>Not dangerous weird.</p><p>Not “someone should probably call someone” weird.</p><p>Just… weird.</p><p>The kind of weird where you’re sitting in a room and suddenly realize everyone else seems to have received a social instruction manual that somehow never reached you.</p><p>I’ve apparently been this way for a while.</p><p>I actually remember being a kid at a party and freezing up so badly that people asked what was wrong with me.</p><p>I didn’t know.</p><p>To be honest, I’m still investigating. 😂</p><p>Then I grew up and went to school.</p><p>Still weird.</p><p>Went to university.</p><p>Still weird.</p><p>Started working.</p><p>Somehow, still weird.</p><p>Different workplaces. Different people. Different environments.</p><p>Same suspect.</p><p>At some point I started thinking maybe I should fix myself.</p><p>Become more normal.</p><p>Speak differently.</p><p>Act differently.</p><p>Think less.</p><p>Explain myself more.</p><p>Or explain myself less.</p><p>Basically, become whatever version of Hassan seemed appropriate for whichever room I happened to be standing in.</p><p>Very efficient.</p><p>Very exhausting.</p><p>And now I’m beginning to wonder:</p><p>What if there was never anything particularly wrong with me?</p><p>What if I’m just… me?</p><p>Which is slightly inconvenient because I was hoping adulthood came with a user manual.</p><p>It doesn’t.</p><p>Apparently they just hand you bills and responsibilities.</p><p>So here we are.</p><p>I’m going to write again.</p><p>Not because I have a business strategy.</p><p>Not because I’m launching a personal brand.</p><p>Not because I’ve discovered the secret to success and would like to sell you a course for KES 4,999.</p><p>I just like writing.</p><p>I like noticing strange little things.</p><p>I like turning thoughts around in my head until they become sentences.</p><p>Sometimes those sentences might make sense.</p><p>Sometimes they probably won’t.</p><p>Sometimes I’ll write something serious.</p><p>Sometimes I’ll write something completely ridiculous.</p><p>And occasionally, I might disappear for three months again.</p><p>At least now you’ll know what happened.</p><p>I was probably somewhere being weird.</p><p>Welcome back to the blog.</p><p>Apparently, so am I.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e7d28fbfe19a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Who Was Prophet Muhammad (ﷺ)? A Reminder of His Life & Legacy]]></title>
            <link>https://hassanzaid.medium.com/who-was-prophet-muhammad-%EF%B7%BA-a-reminder-of-his-life-legacy-67017969bd4f?source=rss-ee8c05de556e------2</link>
            <guid isPermaLink="false">https://medium.com/p/67017969bd4f</guid>
            <category><![CDATA[ramadhan]]></category>
            <category><![CDATA[allah]]></category>
            <category><![CDATA[prophet-muhammad]]></category>
            <category><![CDATA[islam]]></category>
            <dc:creator><![CDATA[Hassan Zaid]]></dc:creator>
            <pubDate>Fri, 28 Feb 2025 16:50:23 GMT</pubDate>
            <atom:updated>2025-02-28T16:50:23.784Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>Prophet Muhammad (ﷺ) is one of the most influential figures in history. He was more than just a religious leader — he was a man of <strong>mercy, wisdom, and strength</strong>, whose teachings continue to guide billions of people today. But who was he really? What was his mission, and why does his life still matter?</p><p>In this article, we will reflect on the <strong>life of Prophet Muhammad (ﷺ)</strong> — his early years, his character, and the message he brought to the world.</p><h3>His Early Life: The Trustworthy One</h3><p>Muhammad (ﷺ) was born in the year <strong>570 CE</strong> in the city of <strong>Makkah</strong>, into the noble <strong>Quraysh</strong> tribe. His father, Abdullah, passed away before he was born, and his mother, Amina, passed away when he was just six years old. He was raised by his grandfather, Abdul Muttalib, and later by his uncle, Abu Talib.</p><p>From a young age, Muhammad (ﷺ) was known for his <strong>honesty, kindness, and trustworthiness</strong>. The people of Makkah gave him the title <strong>“Al-Ameen” (The Trustworthy)</strong> because he never lied or broke a promise. Even before prophethood, he was respected for settling disputes and helping the weak.</p><p>At the age of 25, he married <strong>Khadijah (RA)</strong>, a noble and successful businesswoman. Their marriage was built on <strong>love, respect, and partnership</strong>, and she was the first to believe in his message when he received revelation.</p><h3>The Beginning of His Mission</h3><p>At the age of <strong>40</strong>, while meditating in the <strong>Cave of Hira</strong>, Muhammad (ﷺ) received the first revelation from <strong>Angel Jibreel (Gabriel)</strong>:</p><blockquote><strong><em>“Read! In the name of your Lord who created.”</em></strong><em> </em>(Qur’an 96:1)</blockquote><p>This marked the beginning of his mission as the <strong>final messenger of Allah</strong>. His message was simple but powerful:</p><ul><li><strong>Worship one God (Allah) alone.</strong></li><li><strong>Be just and kind to others.</strong></li><li><strong>Help the poor, orphans, and the oppressed.</strong></li><li><strong>Live with honesty and integrity.</strong></li></ul><p>At first, only a few people accepted his message, but over time, Islam spread across Arabia and beyond.</p><h3>His Leadership and Character</h3><p>Despite facing <strong>persecution, exile, and attacks</strong>, Prophet Muhammad (ﷺ) remained <strong>patient, merciful, and just</strong>. He never sought revenge, even against those who harmed him.</p><ul><li><strong>Mercy:</strong> When he returned to Makkah as a leader, he forgave his enemies, saying: <em>“There is no blame upon you today. May Allah forgive you.”</em> (Muslim)</li><li><strong>Humility:</strong> Despite being a leader, he lived <strong>simply</strong>, mending his own clothes and helping in household chores.</li><li><strong>Justice:</strong> He said: <em>“The most beloved to Allah is the one who brings the most benefit to others.”</em> (Al-Muʻjam al-Awsaṭ)</li><li><strong>Patience:</strong> He endured years of hardship but never abandoned his mission.</li></ul><p>His leadership was not based on power but on <strong>service and compassion</strong>.</p><h3>The Final Message and Legacy</h3><p>After 23 years of spreading the message of <strong>Islam</strong>, Prophet Muhammad (ﷺ) delivered his <strong>Farewell Sermon</strong> during his last Hajj. In it, he emphasized:</p><ul><li><strong>Equality:</strong> <em>“No Arab is superior to a non-Arab, and no non-Arab is superior to an Arab, except by piety.”</em></li><li><strong>Respect for Women:</strong> <em>“Treat women with kindness, for they are your partners and helpers.”</em></li><li><strong>The Qur’an and Sunnah:</strong> <em>“I leave you with two things — if you hold on to them, you will never go astray: the Book of Allah and my Sunnah.”</em></li></ul><p>Shortly after, at the age of <strong>63</strong>, he passed away, leaving behind <strong>a legacy that changed the world</strong>.</p><h3>Why His Life Still Matters</h3><p>The Prophet (ﷺ) was not just a figure of the past — his teachings remain <strong>a guide for humanity</strong>. His life teaches us:</p><ul><li><strong>Integrity in leadership</strong></li><li><strong>Kindness in relationships</strong></li><li><strong>Patience in hardship</strong></li><li><strong>Humility despite success</strong></li></ul><p>Allah says in the Qur’an:</p><blockquote><strong><em>“Indeed, in the Messenger of Allah, you have an excellent example.”</em></strong><em> </em>(Qur’an 33:21)</blockquote><p>May we continue to learn from his life and apply his teachings in our own.</p><h3>Final Thought</h3><p>The Prophet (ﷺ) once said:</p><blockquote>“Convey from me, even if it is one verse.”<em> (Bukhari)</em></blockquote><p>So let’s continue sharing his story and following his example.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=67017969bd4f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HARAMBEE!]]></title>
            <link>https://hassanzaid.medium.com/harambee-b970c2c354c7?source=rss-ee8c05de556e------2</link>
            <guid isPermaLink="false">https://medium.com/p/b970c2c354c7</guid>
            <category><![CDATA[justice]]></category>
            <category><![CDATA[kenya]]></category>
            <category><![CDATA[unity]]></category>
            <category><![CDATA[democracy]]></category>
            <category><![CDATA[love]]></category>
            <dc:creator><![CDATA[Hassan Zaid]]></dc:creator>
            <pubDate>Wed, 26 Jun 2024 19:26:20 GMT</pubDate>
            <atom:updated>2024-06-26T19:26:20.208Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fi7hoyiPBb5C4qwUr6wknA.png" /><figcaption>Harambee - <em>means ‘all pull together’ in Kiswahili.</em></figcaption></figure><p>A new kind of heat shimmered over Kenya, a heat that had nothing to do with the midday sun. It was the heat of hope, of victory clawed from concrete, and nowhere was it felt more keenly than in the heart of Wambui, a young Kenyan brimming with the unyielding spirit of Harambee.</p><p>Wambui had never known such a fierce love for her country. It burned bright in her chest, fueled by the collective roar of a generation rising. Generation Z, they called them, the patriots who had taken to the streets, their voices a chorus for change. This wasn’t just their fight; it was a fight for a better tomorrow, a tomorrow they were building together, Harambee style.</p><p>The path to this moment hadn’t been paved with roses. There were whispers of teargas and clashes, of young lives bruised and broken in the pursuit of justice. Wambui wouldn’t forget them, the brave souls who fell on the frontline of freedom. Their sacrifice echoed in the silent nights, a constant reminder of the price of progress.</p><p>But amidst the grief, a different kind of memory bloomed. The memory of thousands coming together, a tapestry woven from every thread of Kenyan society. From students with raised fists to mamas mbogas banging their sufurias, the spirit of Harambee, the pulling together, had become a tangible force. It was in the knowing glances exchanged between strangers, in the shared water bottles and words of encouragement.</p><p>This victory isn’t just a slice of cake; it is a testament to the power of unity. It was the dream of Harambee, whispered in primary school classrooms, coming alive on the streets. Wambui knew the fight wasn’t over, but for now, she allowed herself to bask in the shared joy, a feeling as vast and vibrant as the Kenyan sky itself.</p><p>As the sun dipped below the horizon, painting the city in hues of orange and purple, Wambui raised her voice in a celebratory chant, the echo of a thousand voices joining her. The spirit of Harambee, rekindled and strong, pulsed through the air, a promise of a brighter future, built together, one hand on top of the other.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b970c2c354c7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Best Jihad is a Word of Truth in Front of an Oppressive Ruler]]></title>
            <link>https://hassanzaid.medium.com/the-best-jihad-is-a-word-of-truth-in-front-of-an-oppressive-ruler-0d6762e58f01?source=rss-ee8c05de556e------2</link>
            <guid isPermaLink="false">https://medium.com/p/0d6762e58f01</guid>
            <category><![CDATA[gen-z]]></category>
            <category><![CDATA[prophet-muhammad]]></category>
            <category><![CDATA[kenya]]></category>
            <category><![CDATA[peace]]></category>
            <category><![CDATA[fighting-for-our-rights]]></category>
            <dc:creator><![CDATA[Hassan Zaid]]></dc:creator>
            <pubDate>Sun, 23 Jun 2024 19:54:09 GMT</pubDate>
            <atom:updated>2024-06-23T19:54:09.671Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/227/1*j_g2Kw-Eq8EMVn5vN1dACA.jpeg" /></figure><p>The air crackled with tension. A sea of faces, some etched with worry, some with anger, gathered in Uhuru Park. Amina, her heart pounding a frantic rhythm against her ribs, stood shoulder-to-shoulder with her neighbors. The cries of “Haki Yetu!” (Our Rights!) echoed through the trees, a powerful current pulling them all forward.</p><p>Suddenly, a group of young men, their faces taut with frustration, charged towards the parliament building. Chants of “Revolution Now!” morphed into a roar. Amina watched, unease blooming in her stomach. She remembered her grandfather’s words, always spoken with a quiet reverence: “<strong>The best jihad is a word of truth in front of a tyrannical ruler</strong>.”</p><p>Fear threatened to paralyze her, but then she recalled the other hadith: “Assist your brother or sister Muslim…by forbidding and withholding that person from oppression.” This wasn’t about choosing a side, it was about channeling their anger in a way that wouldn’t destroy their beloved Kenya.</p><p>Taking a deep breath, Amina pushed through the crowd. She reached the young men just as they were about to throw rocks at the parliament building. “Wait!” she called out, her voice surprisingly steady. All eyes turned towards her. Amina met their gaze, seeing the same pain and frustration reflected in their own.</p><p>“Our anger is righteous,” she began, “but violence only begets more violence. We are Kenyans, united by this beautiful land. Let’s show our leaders the power of Harambee (Pulling Together)!”</p><p>She pointed towards the parliament building. “Let’s march there, not to destroy, but to be heard. Let our voices rise like a unified prayer, demanding change, demanding justice, for all of Kenya!”</p><p>A tense silence followed. Then, slowly, murmurs of agreement rippled through the crowd. The young men, their faces softening, nodded. A young man named Jamal stepped forward. “We are with you, Mama Amina,” he said, his voice thick with emotion.</p><p>The tide turned. The angry roar transformed into a rhythmic chant of “Harambee! Haki Yetu!” Amina, a small but resolute figure at the head of the throng, led the march towards parliament. It wasn’t a march of destruction, but a march of unity, a testament to the power of words spoken in truth, a demonstration that peace and respect, even in dissent, could pave the way for a better Kenya.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0d6762e58f01" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Hash Table to Solve Sum of Two Numbers]]></title>
            <link>https://hassanzaid.medium.com/using-hash-table-to-solve-sum-of-two-numbers-cdfc5f753b9b?source=rss-ee8c05de556e------2</link>
            <guid isPermaLink="false">https://medium.com/p/cdfc5f753b9b</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[data-structure-algorithm]]></category>
            <category><![CDATA[data-structures]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Hassan Zaid]]></dc:creator>
            <pubDate>Sat, 23 Sep 2023 23:36:25 GMT</pubDate>
            <atom:updated>2023-09-23T23:36:25.272Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/596/1*cUXq2gjMdPXG-B0k1cS2-w.png" /><figcaption>Hash Tables</figcaption></figure><p><strong>Problem statement </strong>: <br>Given an array of integers nums and an integer target, return <em>indices of the two numbers such that they add up to </em><em>target</em>.</p><p><strong>First Solution</strong></p><p>In my initial attempt to solve it, I utilized two “for” loops: an outer loop and an inner loop. This approach involved pairing each element from the outer loop with every other element from the inner loop, examining whether their sum equated to the specified target number.</p><pre>function twoSum($nums, $target) {      <br>     $count = count($nums);<br>      for($x = 0; $x &lt; $count; $x++){<br>          for($y = $x + 1; $y &lt; $count; $y++){<br>              if($nums[$x] + $nums[$y] == $target){<br>                 return [$x, $y];<br>              }<br>          }<br>      }<br>     return [];<br>  }</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/665/1*No8rLtxJwgyxg1ztF58g7w.png" /></figure><p>Utilizing nested loops often culminates in an algorithm characterized by a quadratic time complexity denoted as O(n²). In strict technical terms, this implies that the algorithm’s execution time experiences quadratic growth concerning the input size.</p><p>The determination of time complexity is grounded in the assessment of the total operations an algorithm necessitates to reach a desired outcome. To illustrate, let us evaluate our provided array [2,5,5,11]:</p><p>The outer loop, in this instance, undergoes n iterations, with n signifying the count of elements within the array — specifically, n equals 4.</p><p>Concurrently, for each iteration of the outer loop, the inner loop also embarks on n iterations. This multiplicative interaction of the inner loop’s n iterations for each of the outer loop’s n iterations underscores the quadratic time complexity, resulting in the aforementioned O(n²) notation.</p><p>In practical terms, this implies that as the volume of data increases, algorithms governed by O(n²) become notably less efficient. As a result, for large datasets, the processing time experienced by such algorithms can become prohibitively lengthy, making them impractical choices for performance-critical tasks.</p><p>In scenarios where computational efficiency is paramount, it is prudent to explore alternative algorithms with superior time complexity, such as those operating at O(n log n) or linear (O(n)) levels, to ensure timely and scalable data processing.</p><p><strong>Hash Tables</strong></p><p>A hash table is a data structure that allows for efficient data retrieval and storage. It works by using a mathematical function, called a hash function, to map data elements to specific locations in memory, known as buckets. This mapping enables rapid data access because you can quickly determine where to find or store information based on its associated key.</p><pre>class Solution {<br>   function twoSum($nums, $target) {      <br>       $count = count($nums);<br>       $bucket = [];</pre><pre>        for($x = 0; $x &lt; $count; $x++){<br>            $complementary = $this-&gt;hashFunction($target, $nums[$x]);</pre><pre>            if(array_key_exists($complementary, $bucket)){<br>                return [$bucket[$complement], $x];<br>            }<br>         <br>            $bucket[$nums[$x]] = $x; <br>        }<br>       <br>   }</pre><pre>   function hashFunction($target, $number){<br>       return $target - $number;<br>   }</pre><pre>}</pre><p>Our algorithm utilizes hash table data structure and below are the results for its time and space complexity :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/1*-ie1EPZpuC0o9x0q6KzgzQ.png" /></figure><p><strong>How the algorithm works</strong></p><p>In the context of this algorithm, it’s important to establish the concept of a complementary number, which is derived by subtracting the current number from the target number. Essentially, it represents the value needed to augment the current loop iteration’s number in order to achieve the desired target number.</p><p>The algorithm functions by examining whether this complementary number exists within the bucket. If the complementary number is found within the bucket, the algorithm retrieves both its associated value and the index of the current loop iteration, returning this information as the result. In cases where the complementary number is not present in the bucket, the algorithm proceeds to add both the current number and its index to the container for subsequent evaluation.</p><p>In conclusion, it’s important to note that the explanation provided here offers an oversimplified introduction to hash tables. Hash tables, in practice, involve various complexities and considerations, including hash function design, collision handling strategies, load factor management, and memory usage optimization, among others.</p><p>However, the simplified explanation serves as a foundational step in understanding the fundamental concept of hash tables. Learning about hash tables in this simplified manner provides an excellent starting point, helping you grasp the core principles before exploring more advanced topics in data structures and algorithms. Hash tables remain a vital tool for efficient data management, and this introduction paves the way for deeper exploration and practical application in real-world programming scenarios.</p><p>For those interested in tackling this problem hands-on, you can find the detailed problem statement on LeetCode at the following link: <a href="https://leetcode.com/problems/two-sum/">Two Sum Problem</a>.</p><p>Feel free to dive in and explore the problem further to gain practical experience and deepen your understanding of this classic coding challenge.</p><p>All the Best!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cdfc5f753b9b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Using Stack Data Structure]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://hassanzaid.medium.com/using-stack-data-structure-f86e009cc47c?source=rss-ee8c05de556e------2"><img src="https://cdn-images-1.medium.com/max/2600/1*Rz-7WNPM2lkaRMbxKbKGdQ.jpeg" width="3952"></a></p><p class="medium-feed-snippet">A stack is like a pile of plates. You can only add or remove plates from the top. When you add a plate, it goes on the top, and when you&#x2026;</p><p class="medium-feed-link"><a href="https://hassanzaid.medium.com/using-stack-data-structure-f86e009cc47c?source=rss-ee8c05de556e------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://hassanzaid.medium.com/using-stack-data-structure-f86e009cc47c?source=rss-ee8c05de556e------2</link>
            <guid isPermaLink="false">https://medium.com/p/f86e009cc47c</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[data-structure-algorithm]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[data-structures]]></category>
            <category><![CDATA[stack-data-structure]]></category>
            <dc:creator><![CDATA[Hassan Zaid]]></dc:creator>
            <pubDate>Sat, 16 Sep 2023 21:03:00 GMT</pubDate>
            <atom:updated>2023-09-16T21:03:00.609Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[How to Install Apache Web Server on Windows Machine]]></title>
            <link>https://hassanzaid.medium.com/how-to-install-apache-web-server-on-windows-machine-f6ed0ae30ee7?source=rss-ee8c05de556e------2</link>
            <guid isPermaLink="false">https://medium.com/p/f6ed0ae30ee7</guid>
            <category><![CDATA[services]]></category>
            <category><![CDATA[apache]]></category>
            <category><![CDATA[windows]]></category>
            <category><![CDATA[web-server]]></category>
            <dc:creator><![CDATA[Hassan Zaid]]></dc:creator>
            <pubDate>Thu, 30 Mar 2023 05:58:23 GMT</pubDate>
            <atom:updated>2023-03-30T05:58:23.718Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Apache Web Server" src="https://cdn-images-1.medium.com/max/1024/1*P74ZfjonMc7GAk7yZMVSQw.jpeg" /></figure><p>Imagine you are having a big party with all your friends, and you want to share your toys and treats with them. But instead of bringing all your toys and treats to each friend’s house, you decide to set up a special room in your own house where your friends can come and play with your toys and have some treats.</p><p>A web server is like that special room in your house. It’s a special computer that is set up to share things with other computers over the internet, so people can come and play with things like websites, videos, and games. Just like how you invite your friends to come and play in your special room, other computers can ask the web server to share things with them.</p><p>A web server has both physical components and software components.</p><p>The physical components of a web server include the actual computer hardware, such as the processor, memory, hard drive, and network interface card. These components work together to receive and send data over the internet.</p><p>The software components of a web server include the operating system, web server software, and any applications that are running on the server. The operating system is the underlying software that manages the computer’s hardware resources and provides a platform for other software to run on. Web server software is a program that allows the server to receive and respond to requests from other computers over the internet.</p><p>Together, the physical and software components of a web server work together to deliver content and services to users over the internet. When a user requests a webpage or resource from the server, the physical components receive the request and the software components handle the request, processing it and sending back the appropriate response.</p><p><strong>What Is Apache</strong></p><p>Apache is a popular open-source web server software that is used to host and deliver web content over the internet. Apache is designed to work on a wide range of operating systems, including Windows, Linux, and macOS. It is known for its flexibility, reliability, and scalability, and is capable of handling high traffic loads and serving content to thousands of users simultaneously.</p><p><strong>How to Install Apache on Windows</strong></p><p>To install Apache, download the latest Win64 ZIP file from <a href="https://www.apachelounge.com/download/">https://www.apachelounge.com/download/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kPJwM4KKApZwXmmNvoWVGA.png" /><figcaption>apache lounge download page</figcaption></figure><p>Unzip the downloaded folder and move the Apache24 folder to the root of your C: Directory</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/709/1*cdbpFjQk_sQSICbHakYy3g.png" /></figure><p>Your Apache24 folder should look like this. The only folders that you’ll mostly be interacting with are bin, conf, and htdocs.</p><p>The bin directory contains apache’s launch script and wrapper binary used to configure ApacheDS as a service.</p><p>The conf directory contains Apache’s configuration files.</p><p>The htdocs directory is the root content folder, that’s where websites are placed.</p><p>Now let’s try to run apache from the terminal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/978/1*PCiJpsXNk7z0kDPCRhSEZg.png" /></figure><p>cd into the bin directory and run the below command</p><p>httpd.exe</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/937/1*beNlnF6tTYN7pcauh8YPRA.png" /></figure><p>We are getting that error because we haven’t configured a ServerName for our Web Server yet.</p><p>Open the conf directory in a text editor of your choice, then view the httpd.conf file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*3P688m01YVnBzxtlU2qr6g.png" /></figure><p>Press control + F which will enable you to search for a string/name on the file, then type ServerName.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1018/1*NHqXn9QhWamwfbrOCDi6ag.png" /></figure><p>Uncomment the ServerName <a href="http://www.example.com/">www.example.com:80</a> by removing the hash at the front. Then you can replace <a href="http://www.example.com/">www.example.com:80</a> with localhost. This means that when someone opens the browser and types localhost, Apache will open a file that is inside the htdocs folder in the browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/292/1*CJzLwtwbJvz1aM_svB4X5A.png" /></figure><p>Your Server Name should look like this, save the file, and let’s get back to our terminal and try to run the httpd.exe command again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/933/1*eteyQmM7wvHkrZ6hlrqzog.png" /></figure><p>After running that command, if you see a blinking cursor pointer, that’s good news, it means Apache Web Server is up and running.</p><p>Now open your browser and type localhost.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mUBDg4sHHGzslfhMreeqmA.png" /></figure><p>You should see the above, Congratulations!! You have just set up a Web Server.</p><p>Let’s get a bit more into how the “It works!” came to your browser.</p><p>So we set up an Apache web server, and configured the ServerName to localhost, meaning that when someone types localhost on the browser, Apache will go into the htdocs folder and serve a file called index.html to the browser.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*Lw_ESLW9RhIQanUce_rhZg.png" /></figure><p>The index.html has the following contents.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/1*SsL8qqw3lfUiD3AGaJMbnw.png" /></figure><p>That’s basically how apache takes in a request from the browser and returns a response. Cool, right?</p><p><strong>Apache as A Windows Service</strong></p><p>Remember when we had to navigate to the bin directory and run the command httpd.exe ? well, that’s a manual way of starting Apache. It works, but it has a downside that you might have to restart it like that every time it’s off, and that’s not really reliable. We can install Apache as a service thus whenever our computer is turned on, Apache starts automatically, assuming there are no bugs in the configuration files.</p><p>A service is a small program that usually starts when the Windows operating system loads. It runs in the background. In other words, when a computer is turned on, its services also start running automatically, thus no need for a manual start.</p><p>Great, now let’s install Apache as a service.</p><p>On the terminal, navigate to directory c:/Apache24/bin and run the following command <strong>httpd.exe -k install -n “Apache HTTP Server”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/627/1*6g4R2qQZg9Wg6BgoRyAY9Q.png" /></figure><p>In my case, I got the below message since I had installed it earlier, but you should get a service installed successfully or something close to that.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ab8OaWhIJAZh0ojw5Wem6A.png" /></figure><p>Open Services on your windows machine by searching “services” on the taskbar, open the services app and you should see something close to the below image :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/799/1*Nw94chvwLDuZgdI6wVvYaw.png" /></figure><p>As you can see, we have successfully created a windows service named Apache HTTP Server. Click on start the service and you should be up and running.</p><p>Thanks for reading my blog, hope you learned something. Stay tuned for the next part, we’ll be going through how to set up PHP in the Apache Web Server. If you have any questions or corrections for me, please don’t hesitate to leave a comment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f6ed0ae30ee7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Structures]]></title>
            <link>https://hassanzaid.medium.com/data-structures-71d2740ed8fb?source=rss-ee8c05de556e------2</link>
            <guid isPermaLink="false">https://medium.com/p/71d2740ed8fb</guid>
            <category><![CDATA[data-structure-tutorial]]></category>
            <category><![CDATA[data-structures]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Hassan Zaid]]></dc:creator>
            <pubDate>Fri, 10 Feb 2023 15:58:40 GMT</pubDate>
            <atom:updated>2023-02-10T15:58:40.011Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Data Structures and Algorithms concept" src="https://cdn-images-1.medium.com/max/1024/1*u8pt6_iCnp6CLwBhXmJoTg.jpeg" /><figcaption>Image by &lt;a href=”<a href="https://www.freepik.com/free-photo/close-up-warehouse-view_13450069.htm#page=2&amp;query=Storage%20Facilities&amp;position=29&amp;from_view=search&amp;track=ais">https://www.freepik.com/free-photo/close-up-warehouse-view_13450069.htm#page=2&amp;query=Storage%20Facilities&amp;position=29&amp;from_view=search&amp;track=ais</a>&quot;&gt;Freepik&lt;/a&gt;</figcaption></figure><p>Data structures can be thought of as containers that are used to store data in computer memory. Just like how you’d store utensils in containers for easy access and retrieval, data structures are used to store data in memory for easy access and manipulation.</p><p><strong>Linear Data Structures</strong><br>Linear data structure store data in a linear order, one after the other, in memory. Examples of linear data structures are arrays, linked lists, stacks, and queues.</p><p><strong>Non-Linear Data Structures</strong></p><p>Non-Linear Data Structures store data in a more complex, interrelated manner. Examples of non-linear data structures are Trees, Graphs, Hash Tables, and Maps</p><p><strong>Arrays</strong></p><p>An Array is a Data Structure that stores data adjacent to each other in a continuous range of memory addresses.</p><p><strong>Linked List</strong><br>A linked list is a data structure that stores data in objects that contain the data itself and a reference, called a link, to the next object of the linked list. A Linked List does not store its objects in a continuous range of memory addresses the way Arrays do.</p><p><strong>Stacks</strong><br>A Stack is an implementation of a Linked list or Array that specifies how the data can be accessed. A Stack operates on the Last in First Out principle, meaning that the last data added is the first data to be removed. A good example of Stack in action is when you write some code on your text editor and you made a mistake: CTRL + Z. The last piece of code is added to the stack and when you hit undo, it’s the first item to be removed from the stack. Wish life had an undo button! Another use case of the stack is how websites enable you to navigate between pages using the browser&#39;s back button.</p><p><strong>Queues<br></strong>A Queue is also an implementation of an Array or a Linked list that specifies how data can be accessed. Queues operate on the First in First Out principle, meaning that the first data added is the first data to be removed. A good example of Queues in action is how network systems handle incoming requests.</p><p><strong>Factors to consider when choosing a Data Structure:</strong></p><p>Space complexity: This measures how much space is needed by a data structure to store data. Take for example having to decide between storing data in an Array or a Linked List, Linked Lists consume more space in memory than Arrays since they need extra space to store references among their objects.</p><p>Access Pattern: This describes how fast elements can be accessed and modified within a Data Structure. Arrays provide direct access to elements using their index, however, inserting and deleting elements in an array can be time-consuming considering data in the array will have to be shifted to accommodate the new change. Linked Lists allow for fast insertions and deletions since only pointers need to be updated. However, it’s relatively slow to perform search operations on a Linked List since one has to start from the first element of the list(head) and follow the link until one gets to the target element. Stack provides efficient access to the last element in the stack but not to other elements in the stack. Queues on the other hand provide efficient access to the first and last element in the Queue but not to the middle elements.</p><p>Sorting capabilities: This describes the capabilities of a Data structure to rearrange its elements. Arrays can be sorted using a variety of sorting algorithms, including quick sort, merge sort, bubble sort, insertion sort, and selection sort. Arrays can be sorted in place, meaning that the elements are rearranged within the same memory locations, or they can be sorted by creating a new, sorted array. Linked lists can be sorted using a variety of sorting algorithms, but these algorithms are typically less efficient than the algorithms used to sort arrays. Sorting linked lists can be done by rearranging the links between nodes, or by creating a new linked list with the sorted elements. Stacks do not have built-in sorting capabilities, as they are designed for last-in, first-out (LIFO) access to elements. Similar to Stacks, Queues do not have built-in sorting capabilities, as they are designed for first-in, first-out (FIFO) access to elements. However, the elements in a stack or queue can be sorted by transferring them to an array or linked list and then sorting the Data Structure.</p><p>Concurrency: Concurrency refers to the ability of multiple processes or threads to access and manipulate data structures simultaneously. Linked lists, Stacks, and Queues have support for concurrent access. But you have to be really careful to avoid race conditions when multiple processes or threads attempt to perform operations on the same Data Structure simultaneously. Locks or other synchronization mechanisms can be used to prevent simultaneous access of Data Structures by multiple processes or threads.</p><p>Each data structure has its own strengths and weaknesses, and the choice of data structure will depend on the specific requirements of your application.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=71d2740ed8fb" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>