<?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 Mohammad AlBdour on Medium]]></title>
        <description><![CDATA[Stories by Mohammad AlBdour on Medium]]></description>
        <link>https://medium.com/@mobidroid92?source=rss-184e85e1fc63------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Stories by Mohammad AlBdour on Medium</title>
            <link>https://medium.com/@mobidroid92?source=rss-184e85e1fc63------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 17:31:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mobidroid92/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[Perfection, Getting Things Done, and the Ostrich Algorithm]]></title>
            <link>https://medium.com/@mobidroid92/perfection-getting-things-done-and-the-ostrich-algorithm-8d4cdf35500b?source=rss-184e85e1fc63------2</link>
            <guid isPermaLink="false">https://medium.com/p/8d4cdf35500b</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[management]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[prioritization]]></category>
            <category><![CDATA[progress]]></category>
            <dc:creator><![CDATA[Mohammad AlBdour]]></dc:creator>
            <pubDate>Fri, 20 Sep 2024 08:09:36 GMT</pubDate>
            <atom:updated>2024-09-20T08:09:36.688Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Balancing for Real Progress</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*lICmwZ3XSerUdYqU" /><figcaption>Photo by <a href="https://unsplash.com/@christinhumephoto?utm_source=medium&amp;utm_medium=referral">Christin Hume</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><strong>The Trap of Perfection</strong></p><p>In the world of productivity, perfection can feel like both a good and bad thing. It pushes us to refine our work, ensuring that every detail shines. But more often, it becomes a roadblock that stands between us and completing tasks.</p><p>It’s hard to let go of the idea that everything needs to be perfect before we can call it “done.” As developers or professional creators, we aim to produce work that reflects our high standards, but this often comes at the cost of finishing things on time or over-engineering them.</p><p>Perfection, in many cases, is caused by fear, fear of criticism, fear of failure, or fear of delivering something that doesn’t meet expectations. While refining work is important, constantly pointing at minor details that don’t contribute significantly to the outcome can be paralyzing.</p><p><strong>The Power of Execution</strong></p><p>The “Getting Things Done” (GTD) mindset focuses on action and completion. It’s about breaking tasks down into manageable steps, prioritizing, and shipping your work. This mindset helps us overcome perfection by putting more value on completion.</p><p>For example, in the world of software development, releasing a Minimum Viable Product (MVP) rather than waiting for a perfect version is a game-changer. It allows us to test ideas, gather feedback, and iterate quickly.</p><p>Focusing on getting things done can feel good. But, it doesn’t mean producing work of low quality, but knowing when “good enough” is good enough.</p><p>Real progress often means moving forward despite imperfections. However, moving too fast without attention to detail can lead to unfinished or low-quality work.</p><p>This is where the balance between perfection and productivity becomes critical.</p><p><strong>Focus on What Truly Matters</strong></p><p>The Ostrich Algorithm is a term in computer science that refers to ignoring potential problems that are highly unlikely to happen. Instead of trying to anticipate and fix every possible issue, which can be often unnecessary effort and time-consuming, the focus is on the immediate tasks that are more relevant and manageable.</p><p>Applied to productivity, the Ostrich Algorithm means choosing which problems to address now and which to ignore for the time being. It’s about realizing that not every detail needs your attention, and not every obstacle has to be solved today.</p><p>For example, you might notice a small flaw in your work that bothers you, but fixing it could take hours. Instead of letting it lower or even stop your progress, you put it aside for now and complete the larger, more critical aspects of the task. If that small flaw ends up being important later, you can address it in future iterations.</p><p><strong>The Balance: When to Apply What</strong></p><p>The key to long-term success is in balancing these mindsets:</p><p><strong>Set Priorities</strong>: Know what needs to be perfect and what doesn’t. For example, in a client presentation, the design and text might need to be flawless.</p><p><strong>Time-Boxing</strong>: Give yourself a limited amount of time to perfect a certain aspect of your work. Once the time is up, move on. This forces you to focus on the most critical improvements.</p><p><strong>Iterate</strong>: Instead of aiming for perfection in the first release, deliver a solid version that’s good enough, gather feedback, and iterate. This allows you to make improvements rather than chasing perfection.</p><p><strong>Selective Ignorance</strong>: Apply the Ostrich Algorithm by intentionally ignoring problems that are very rare to happen or don’t need immediate attention.</p><p><strong>Final Thoughts</strong></p><p>Perfection, getting things done, and The Ostrich Algorithm are all about finding a balance.</p><p>Aiming for perfection can motivate us to deliver our best, but it’s important to recognize when it’s slowing us down. Getting things done ensures progress, but not at the expense of quality. By focusing on what truly matters and ignoring what doesn’t, you’ll find yourself achieving more and stressing less.</p><p>And ultimately, that’s the key to making a real progress!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8d4cdf35500b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Hello Delegates, Goodby Base Classes]]></title>
            <link>https://medium.com/@mobidroid92/hello-delegates-goodby-base-classes-c8aeedc2b855?source=rss-184e85e1fc63------2</link>
            <guid isPermaLink="false">https://medium.com/p/c8aeedc2b855</guid>
            <category><![CDATA[kotlin]]></category>
            <category><![CDATA[clean-code]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[androiddev]]></category>
            <category><![CDATA[android-app-development]]></category>
            <dc:creator><![CDATA[Mohammad AlBdour]]></dc:creator>
            <pubDate>Tue, 11 Oct 2022 16:34:59 GMT</pubDate>
            <atom:updated>2022-10-11T16:34:59.084Z</atom:updated>
            <content:encoded><![CDATA[<p>Build base-free Android apps by using reusable delegates.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*it6PaOkv4Q_wQ0Yc" /><figcaption>Photo by <a href="https://unsplash.com/@ricaros?utm_source=medium&amp;utm_medium=referral">Danial Igdery</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>One of the things we used to do when starting new Android projects is set its Base classes, like BaseActivity, BaseFragment, BaseViewModel, BaseRecyclerAdapter…. and so on. So we have a structure to follow and not repeat our code over and over again.</p><p>But wait a minute, is that following the SOLID principles? What about the Single Responsibility principle? What about big God basses? What about all child classes has a functionality that they may not use at all? What about making a change in that Base class? Is that going to break all classes that inherit from it? What if we need different variants of that Base class?</p><p>We can see that the benefit of bases comes with many problems and high risks. Any change of that base requires changing a lot of classes, a lot of time, a lot of effort, and a lot of testing…. because things are tightly coupled.</p><h3>In general, to reuse our code, we have multiple relationship options :</h3><h4>1- Inheritance</h4><p>It derives one class from another, so the relationship is: “is-a”, Like Cat is an Animal. It should be avoided in general in favor of association if we can. Also, in OOP, we can’t inherit from multiple classes.</p><blockquote>For more info on this, see the <a href="https://en.wikipedia.org/wiki/Multiple_inheritance">Diamond Problem</a>.</blockquote><h4>2- <strong>Association</strong></h4><p>It defines a class as the sum of its parts (other classes). So whenever we need some functionality, we can call other objects and use their functionality in our class. Here the relationship is: “has-a”, Like Car has-an Engine.</p><h3>Association can be achieved by :</h3><h4>1- Aggregation</h4><p>It is a weak association like every employee has an access card. Employees can exist on their own, and so the access card is.</p><h4>2- Composition</h4><p>It is a strong association, like a house has-a room, but a room can’t exist without a house. So the lifecycle of a room is controlled by the house.</p><h3>After all this, can we use association just like inheritance? Yes, Here is where <strong>Delegates</strong> shine!</h3><p>Let’s start with the fun part. I will demonstrate how delegates work with adding the functionality of a ToolBar to an Android Activity.</p><p>To apply the delegate&#39;s concept, we have to follow 4 steps:</p><h4>Step 1</h4><p>Define the functionality that this delegate is responsible for.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/05c9b059b19e8a414642ffd10caf3b6c/href">https://medium.com/media/05c9b059b19e8a414642ffd10caf3b6c/href</a></iframe><h4>Step: 2</h4><p>Implement this functionality.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/9f95e850133c20c813b7eb53175e4d0b/href">https://medium.com/media/9f95e850133c20c813b7eb53175e4d0b/href</a></iframe><h4>Step: 3</h4><p>Instantiate any of these delegate implementations.</p><h4>Step: 4</h4><p>Make your class implement this delegate interface, then delegate its functionality.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d1c2c6bd5c600028e42a174961a41272/href">https://medium.com/media/d1c2c6bd5c600028e42a174961a41272/href</a></iframe><h4>Bonus:</h4><p>This is a lot of added code. Can we simplify things?</p><p>Sure we can! Luckily Kotlin has out-of-the-box support for delegates! It’s the magic of the keyword “by”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ky7s24K1ReJhfZOj" /><figcaption>Photo by <a href="https://unsplash.com/@acharki95?utm_source=medium&amp;utm_medium=referral">Aziz Acharki</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Let’s see that in action:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/11b1c6cb7df8317667dbbb07fed6b170/href">https://medium.com/media/11b1c6cb7df8317667dbbb07fed6b170/href</a></iframe><p>I hope this article will help you have a cleaner code that is easy to maintain.</p><p>For more info see the<em> </em><a href="https://kotlinlang.org/docs/delegation.html">Kotlin official documentation</a>.</p><p><em>Thanks for reading, and stay tuned for more!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c8aeedc2b855" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>