<?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 Mazhar Ahmed on Medium]]></title>
        <description><![CDATA[Stories by Mazhar Ahmed on Medium]]></description>
        <link>https://medium.com/@mazhar?source=rss-64c2f9b495c5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*axnglohBrxI2e44pm4Pw1w.png</url>
            <title>Stories by Mazhar Ahmed on Medium</title>
            <link>https://medium.com/@mazhar?source=rss-64c2f9b495c5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 20:18:07 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mazhar/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[Optimizing Memory Leaks in Azure Functions]]></title>
            <link>https://medium.com/@mazhar/optimizing-memory-leaks-in-azure-functions-ccc839b4f2cf?source=rss-64c2f9b495c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/ccc839b4f2cf</guid>
            <category><![CDATA[autoscale]]></category>
            <category><![CDATA[memory-management]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[azure-functions]]></category>
            <dc:creator><![CDATA[Mazhar Ahmed]]></dc:creator>
            <pubDate>Thu, 01 Jan 2026 20:47:57 GMT</pubDate>
            <atom:updated>2026-01-01T20:47:57.124Z</atom:updated>
            <content:encoded><![CDATA[<h3>A Real-World Cleanup</h3><p>Memory issues in <strong>Azure Functions</strong> don’t usually crash your app on day one — they quietly bleed performance until scale exposes them. Recently, we completed a deep dive on a production .NET Functions codebase and fixed <strong>all known memory and thread leaks</strong>. Here’s what mattered, what broke things, and how we fixed them — cleanly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bzHyrHj4el32TGnK" /><figcaption>Photo by <a href="https://unsplash.com/@growtika?utm_source=medium&amp;utm_medium=referral">Growtika</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Why Azure Functions Are Extra Sensitive</h3><p>Azure Functions are:</p><ul><li><strong>Long-lived</strong> (especially in Premium / Dedicated plans)</li><li><strong>Highly concurrent</strong></li><li><strong>Async-heavy</strong></li></ul><p>That makes <em>small</em> mistakes — like one blocked async call or an undisposed service provider — compound fast.</p><h3>The Biggest Leak Patterns</h3><h4>1. BuildServiceProvider() — the silent memory hoarder</h4><p><strong>Problem</strong><br>BuildServiceProvider() creates a full container that <strong>must be disposed</strong>. Leaving it around pins every registered service in memory.</p><p><strong>Fix</strong><br>Always wrap it in using, or better—<strong>don’t build it at all</strong> unless absolutely necessary.</p><pre>using (var sp = services.BuildServiceProvider())<br>{<br>    var config = sp.GetRequiredService&lt;IOptions&lt;MyConfig&gt;&gt;().Value;<br>}</pre><p>In several cases, we deleted BuildServiceProvider() entirely—zero cost, instant win.</p><h4>2. HttpClient misuse — socket &amp; thread exhaustion</h4><p><strong>Problem</strong></p><ul><li>new HttpClient() per request</li><li>Building service providers <em>inside</em> AddHttpClient delegates</li></ul><p>This is catastrophic in Functions.</p><p><strong>Fix</strong><br>Use IHttpClientFactory <strong>correctly</strong> and let DI inject the IServiceProvider.</p><pre>services.AddHttpClient(&quot;ServiceName&quot;,<br>    (sp, client) =&gt;<br>{<br>    client.BaseAddress = new Uri(config.BaseUrl);<br>});</pre><p><strong>Result</strong>: stable sockets, no thread churn.</p><h4>3. Finalizers instead of IDisposable</h4><p><strong>Problem</strong><br>A Redis service relied on a finalizer (~RedisService) to clean up connections.</p><p>Finalizers:</p><ul><li>Run on the GC finalizer thread</li><li>Delay cleanup</li><li>Block GC under load</li></ul><p><strong>Fix</strong><br>Implement the <strong>proper IDisposable pattern</strong> and suppress finalization.</p><pre>public void Dispose()<br>{<br>    Dispose(true);<br>    GC.SuppressFinalize(this);<br>}</pre><p>This alone eliminated <strong>hundreds of leaked threads</strong>.</p><h4>4. Sync-over-Async = thread starvation</h4><p><strong>Problem</strong><br>.Result, .Wait(), .GetAwaiter().GetResult() inside async flows.</p><p>In Azure Functions, this:</p><ul><li>Blocks thread pool threads</li><li>Kills throughput</li><li>Can deadlock under load</li></ul><p><strong>Fix</strong><br>Make the entire call chain async. No exceptions.</p><pre>var data = await repository.GetAsync();</pre><p>Yes, it sometimes means touching interfaces — but it’s worth it.</p><h4>5. Constructors doing async work</h4><p><strong>Problem</strong><br>Async calls blocked inside constructors using .GetAwaiter().GetResult().</p><p><strong>Fix</strong><br>Use <strong>lazy async initialization</strong> with SemaphoreSlim.</p><pre>await _initLock.WaitAsync();<br>try { /* initialize once */ }<br>finally { _initLock.Release(); }</pre><h4>6. SemaphoreSlim not disposed</h4><p><strong>Problem</strong><br>SemaphoreSlim owns a WaitHandle. No disposal = handle leak.</p><p><strong>Fix</strong><br>Factories now implement IDisposable and clean up properly.</p><h3>The Outcome (Hard Numbers)</h3><ul><li>37+ leak points fixed</li><li>Thread leaks: reduced to ZERO</li><li>No more thread pool exhaustion</li><li>Stable memory over long runs</li><li>Production-ready Azure Functions</li></ul><h3>Best Practices We Locked In</h3><ul><li>Never call BuildServiceProvider() casually</li><li>Never block on async</li><li>Never use finalizers for managed resources</li><li>Always dispose SemaphoreSlim</li><li>Use IHttpClientFactory the <em>right</em> way</li><li>Treat Azure Functions as <strong>long-running services</strong>, not scripts</li></ul><h3>Final Thought</h3><p>Most Azure Functions “performance problems” aren’t about scale — they’re about <strong>discipline</strong>. Once resource lifetimes are respected, Functions become boringly stable. And boring is good.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ccc839b4f2cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[‘নেককার’গণের ইচ্ছাকৃত মিথ্যা]]></title>
            <link>https://medium.com/@mazhar/%E0%A6%A8%E0%A7%87%E0%A6%95%E0%A6%95%E0%A6%BE%E0%A6%B0%E0%A6%97%E0%A6%A3%E0%A7%87%E0%A6%B0-%E0%A6%87%E0%A6%9A%E0%A7%8D%E0%A6%9B%E0%A6%BE%E0%A6%95%E0%A7%83%E0%A6%A4-%E0%A6%AE%E0%A6%BF%E0%A6%A5%E0%A7%8D%E0%A6%AF%E0%A6%BE-4b78fba4fbbb?source=rss-64c2f9b495c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/4b78fba4fbbb</guid>
            <category><![CDATA[islam]]></category>
            <category><![CDATA[sufi]]></category>
            <category><![CDATA[hadith]]></category>
            <category><![CDATA[false]]></category>
            <dc:creator><![CDATA[Mazhar Ahmed]]></dc:creator>
            <pubDate>Thu, 22 Feb 2024 04:53:34 GMT</pubDate>
            <atom:updated>2024-02-22T04:53:34.892Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*h69KBfRqxLdcl0gB" /><figcaption>Photo by <a href="https://unsplash.com/@sammoghadamkhamseh?utm_source=medium&amp;utm_medium=referral">Sam Moghadam Khamseh</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>‘নেককার’ বলে পরিচিত কিছু মানুষ জঘন্য কাজে লিপ্ত হতেন। তারা ইচ্ছাকৃতভাবে বানোয়াট কথা রাসূলুল্লাহ (ﷺ)-এর নামে বলতেন। হাদীস জালিয়াতিতে এরাই ছিলেন সবচেয়ে ভয়ঙ্কর ও ক্ষতিকারক। তারা যে সকল বিষয়ে হাদীস বানিয়েছেন, তার অনেক বিষয়ে অনেক সহীহ হাদীস রয়েছে। কিন্তু এসকল নেককার (!) মানুষ অনুভব করেছেন যে, এ সকল সহীহ হাদীসের ভাষা ও সেগুলিতে বর্ণিত পুরস্কার বা শাস্তিতে মানুষের আবেগ আসে না। তাই তারা আরো জোরালো ভাষায়, বিস্তারিত কথায়, অগণিত পুরস্কার ও কঠিনতম শাস্তির কথা বলে হাদীস বানিয়েছেন, যেন মানুষেরা তা শুনেই প্রভাবিত হয়ে পড়ে। এভাবে তাঁরা ‘ওহীর’ অপূর্ণতা (!) মানবীয় বুদ্ধি দিয়ে পূরণ (!) করতে চেয়েছেন। সবচেয়ে কঠিন বিষয়, তাদের ‘ধার্মিকতা’র কারণে সমাজের অনেক মানুষই তাদের এসকল জালিয়াতির খপ্পরে পড়তেন। তাঁরা এগুলোকে হাদীস বলে বিশ্বাস করেছেন। শুধুমাত্র ‘নাকিদ’ মুহাদ্দিসগণ তুলনামূলক নিরীক্ষার মাধ্যমে তাদের জালিয়াতি ধরেছেন।</p><p>শয়তান এদেরকে বুঝিয়েছিল যে, আমরা তো রাসূলুল্লাহ (ﷺ)-এর বিরুদ্ধে নয়, পক্ষেই মিথ্যা বলছি। এ সকল মিথ্যা ছাড়া মানুষদের হেদায়েত করা সম্ভব নয়। কাজেই ভাল উদ্দেশ্যে মিথ্যা বলা শুধু জায়েযই নয় বরং ভাল কাজ। শয়তান তাদেরকে বুঝতে দেয় নি যে, মিথ্যা ছাড়া মানুষদেরকে ভাল পথে আনা যাবে না একথা ভাবার অর্থ হলো, ওহী মানুষের হেদায়েত করতে সক্ষম নয় বলে চিন্তা করা! কুরআন-হাদীস তার কার্যকরিতা হারিয়ে ফেলেছে। কাজেই আজগুবি মিথ্যা দিয়ে মানুষকে হেদায়েত করতে হবে! কি জঘন্য চিন্তা!</p><p>তাদের এসব মনগড়া কথা যে, ওহীর পক্ষে বা আল্লাহ ও তাঁর রাসূলের (ﷺ) পক্ষে সে কথা দাবী করার অধিকার তাদের কে দিয়েছে? তারা যে কথাকে ইসলামের পক্ষে বলে বলে মনে করেছে তা সর্বদা ইসলামের সবচেয়ে বেশি ক্ষতি করেছে। আজগুবি গল্প, অল্প কাজের অকল্পনীয় সাওয়াব, সামান্য অন্যায়ের বা পাপের ঘোরতর শাস্তি, সৃষ্টির বিভিন্ন বিষয় নিয়ে কাল্পনিক কাহিনী, কাল্পনিক অলৌকিক কাহিনী, বিভিন্ন বানোয়াট ফযীলতের কাহিনী ইত্যাদি মুসলিম উম্মাহকে ইসলামের মূল শিক্ষা থেকে বিচ্যুত করেছে। অগণিত কুসংস্কার ছড়িয়েছে তাদের মধ্যে। নফল ‘ইবাদতের’ সাওয়াবে বানানো মনগড়া সাওয়াবের কল্প কাহিনী মুসলিম উম্মাহকে ফরয দায়িত্ব ভুলিয়ে দিয়েছে। অগণিত মনগড়া ‘আমল’ মুসলমানদেরকে কুরআন ও সহীহ হাদীসে বর্ণিত কর্ম থেকে দূরে সরিয়ে দিয়েছে। আমরা পরবর্তী অধ্যায়ে বানোয়াট হাদীসগুলো আলোচনার সময় এসবের অনেক উদাহরণ দেখতে পাব।</p><p>‘ওহীর পক্ষে মিথ্যা বলার’ কারণেই যুগে যুগে সকল ধর্ম বিকৃত হয়েছে। ওহীর পক্ষে মিথ্যা বলে বিভ্রান্ত হওয়ার প্রকৃষ্ট উদাহরণ খৃস্টধর্মের বিকৃতিকারী পৌল নামধারী শৌল এবং তার অনুসারী খৃস্টানগণ। এরা ‘ঈশ্বরের’ মর্যাদা বৃদ্ধির জন্য, ‘যীশু’-র মর্যাদা বৃদ্ধির জন্য ও অধিক সংখ্যক মানুষকে ‘সুপথে’ আনয়ন করার জন্য ওহীর নামে মিথ্য বলেছে। এরা ভেবেছে যে, আমরা ঈশ্বরের বা যীশুর পক্ষে বলছি, কাজেই এ মিথ্যায় কোনো দোষ নেই। কিন্তু তারা মূলত শয়তানের খেদমত করেছে। আল্লাহ বলেন:</p><p>قُلْ يَاأَهْلَ الْكِتَابِ لا تَغْلُوا فِي دِينِكُمْ غَيْرَ الْحَقِّ وَلا تَتَّبِعُوا أَهْوَاءَ قَوْمٍ قَدْ ضَلُّوا مِنْ قَبْلُ وَأَضَلُّوا كَثِيرًا وَضَلُّوا عَنْ سَوَاءِ السَّبِيلِ</p><p>‘‘বল হে কেতাবীগণ, তোমরা তোমাদের দীন (ধর্ম) সম্বন্ধে অন্যায় বাড়াবাড়ি করো না; এবং যে-সম্প্রদায় ইতোপূর্বে পথভ্রষ্ট হয়েছে, অনেককে পথভ্রষ্ট করেছে এবং সরলপথ থেকে বিচ্যুত হয়েছে তাদের খেয়াল-খুশীর অনুসরণ করো না।’’[1]</p><p>মুসলিম উম্মাহর মধ্যেও এ ধরনের পথভ্রষ্ট খেয়াল-খুশীমত ওহী বানানো সম্প্রদায়ের অস্তিত্ব দেখা দিয়েছে। তবে সনদ ও সনদ নিরীক্ষা ব্যবস্থার ফলে এদের জালিয়াতি ধরা পড়ে গিয়েছে। এ সকল ‘নেককার জালিয়াত’ বিভিন্ন পদ্ধতিতে হাদীস তৈরি করতেন।</p><p><strong>ক.</strong> কিছু মানুষ কুরআন এবং কুরআনের বিভিন্ন সূরা তিলাওয়াতের ‘অগণিত’ কাল্পনিক সাওয়াব বর্ণনা করে হাদীস তৈরি করতেন।</p><p><strong>খ.</strong> অন্য অনেকে প্রসিদ্ধ ও প্রচলিত বিভিন্ন নেক আমলের সাওয়াব বর্ণনায় হাদীস তৈরি করতেন। যেমন তাসবীহ, যিকির, তাহাজ্জুদ, চাশত ইত্যাদি ইবাদতের জন্য সহীহ হাদীসে অনেক সাওয়াব বর্ণিত হয়েছে। তারা মনে করতেন যে, এসকল হাদীস মানুষের চিত্তাকর্ষণ করতে পারে না। এজন্য এ সকল বিষয়ে ‘আকর্ষণীয়’ হাদীস তৈরি করতেন। অনুরূপভাবে সুন্নাতের পক্ষে ও বিদ‘আতের বিপক্ষে অনেক সহীহ হাদীস রয়েছে। এ সকল জালিয়াত সেগুলোতে খুশি হতে পারেন নি। তাঁরা সুন্নাতের সাওয়াব, মর্যাদা এবং বিদ‘আতের পাপ ও বিদ‘আতীদের কঠিন পরিণতি ও ভয়ঙ্কর শাস্তির বিষয়ে অনেক হাদীস বানিয়েছেন।</p><p><strong>গ.</strong> কেউ কেউ বিভিন্ন প্রকারের ‘নেক আমল’ তৈরি করে তার ফযীলতে হাদীস বানাতেন। যেমন বিভিন্ন মাসের জন্য বিশেষ পদ্ধতির সালাত, সপ্তাহের প্রত্যেক দিনের জন্য বিশেষ সালাত, আল্লাহকে স্বপ্নে দেখা, রাসূলুল্লাহ ﷺ-কে স্বপ্নে দেখা, জান্নাতে নিজের স্থান দেখা ইত্যাদি উদ্দেশ্য সাধনের জন্য বিশেষ সালাত। অনুরূপভাবে বিভিন্ন ‘দরুদ’, ‘যিকির’, ‘দোয়া’, ‘মুনাজাত’ ইত্যাদি বানিয়ে সেগুলোর বানোয়াট ফযীলত উল্লেখ করে হাদীস তৈরি করেছেন। এরূপ অগণিত ‘ইবাদত’ তারা তৈরি করেছেন এবং এগুলির ফযীলতে কল্পনার ফানুস উড়িয়ে অগণিত সাওয়াব ও ফযীলতের কাহিনী বলেছেন।</p><p><strong>ঘ.</strong> অনেক মানুষের অন্তর নরম করার জন্য সংসার ত্যাগ, লোভ ত্যাগ, ক্ষুধার ফযীলত, দারিদ্রে্যর ফযীলত, বিভিন্ন কাহিনী, শাস্তি, পুরস্কার বা অনুরূপ গল্প কাহিনী বানিয়ে রাসূলুল্লাহ (ﷺ)-এর নামে চালিয়েছেন।</p><p>এখানে এ ধরনের দু’এক ব্যক্তির স্বীকারোক্তি উল্লেখ করছি। এ সকল মানুষ মুহাদ্দিসগণের কাছে তাদের মিথ্যা সনদগুলো প্রতিষ্ঠার চেষ্টা করত। তবে তাঁদের নিরীক্ষামূলক প্রশ্নের মুখে অনেক সময় স্বীকার করতো যে, তারা হাদীস জালিয়াতি করেছে।</p><p>দ্বিতীয় হিজরী শতকের একজন প্রখ্যাত আলিম, আবিদ ও ফকীহ আবু ইসমাহ নূহ ইবনু আবু মারিয়াম (১৭৩ হি)। হাদীস, ফিকহ, ইতিহাস ইত্যাদি বিভিন্ন বিষয়ে তার চৌকস পান্ডিত্যের কারণে তাকে ‘আল-জামি’ বলা হতো। খলীফা মানসূরের সময়ে (১৩৬-১৫৮ হি) তাকে খোরাসানের মারভ অঞ্চলের বিচারপতি নিয়োগ করা হয়। তাকে সে এলাকার অন্যতম আলিম বলে গণ্য করা হতো। মু’তাযিলা, জাহমিয়া, আহলুর রাই ফকীহ ও বিদ‘আতী সম্প্রদায়ের বিরুদ্ধে তিনি কঠোর ছিলেন।</p><p>এত কিছু সত্ত্বেও তিনি হাদীসের নামে মিথ্যা কথা বলতেন। তিনি কুরআনের বিভিন্ন সূরার ফযীলতে কিছু হাদীস বর্ণনা করতেন। মুহাদ্দিসগণ তাকে প্রশ্ন করেন: আপনি ইকরিমাহ থেকে আব্দুল্লাহ ইবনু আববাস থেকে কুরআনের প্রত্যেক সূরার ফযীলতে যে হাদীস বলেন তা আপনি কোথায় পেলেন? ইকরিমাহ-এর ঘনিষ্ট ছাত্রগণ বা অন্য কোনো ছাত্র এ হাদীস বর্ণনা করেন না, অথচ আপনি কিভাবে তা পেলেন? তখন তিনি বলেন: আমি দেখলাম, মানুষ কুরআন ছেড়ে দিয়েছে। তারা আবু হানীফার ফিকহ এবং ইবনু ইসহাকের মাগাযী নিয়ে ব্যস্ত হয়ে পড়েছে। এজন্য আমি তাদেরকে কুরআনের দিকে ফিরিয়ে আনতে এ হাদীস বানিয়েছি।[2]</p><p>তৃতীয় হিজরী শতকের প্রসিদ্ধ আবিদ, আলিম ও ওয়ায়িয আহমাদ ইবনু মুহাম্মাদ ইবনু গালিব গুলাম খালীল (২৭৫ হি)। তিনি রাজধানী বাগদাদের অন্যতম শ্রেষ্ঠ সংসারত্যাগী আবিদ বলে প্রসিদ্ধ ছিলেন। তিনি সর্বদা শাক সব্জি খেতেন, অতি সাধারণ জীবন যাপন করতেন এবং অত্যন্ত হৃদয়গ্রাহী ওয়ায করতেন। ‘আহলুর রাই’ বলে কথিত (হানাফী) ফকীহগণের বিরুদ্ধে, মু’তাযিলা, শিয়া, কাদারিয়া, জাবারিয়া ও অন্যান্য বিদআতী মতের বিরুদ্ধে তিনি ছিলেন অত্যন্ত কঠোর। সাধারণের মধ্যে তার ওয়াজের প্রভাব ছিল অনেক। শ্রোতাদের মন নরম করতে ও তাদের হেদায়েতের উদ্দেশ্যে তিনি নিত্যনতুন গল্প কাহিনী হাদীসের নামে জালিয়াতি করে বলতেন। প্রসিদ্ধ মুহাদ্দিসগণের নামে সনদ তৈরি করে তিনি মিথ্যা হাদীসগুলো বলতেন।</p><p>আবু জা’ফার ইবনুশ শুআইরী বলেন, একদিন গুলাম খালীল হাদীস বলতে গিয়ে বলেন, আমাকে বাকর ইবনু ঈসা (২০৪ হি) বলেছেন, তিনি আবু উওয়ানা থেকে….। আমি বললাম, বাকর ইবনু ঈসা তো অনেক পুরাতন মানুষ। ইমাম আহমাদ (২৪১ হি) ও তাঁর প্রজন্মের মানুষেরা তার কাছ থেকে হাদীস শুনেছেন। আপনি তাকে জীবিত দেখেন নি। একথা বলার পরে তিনি চুপ করে চিন্তা করতে থাকেন। আমি ভয় পেয়ে গেলাম। তিনি আমার বিরুদ্ধে কিছু বলে ফেলেন কিনা। এজন্য আমি বললাম: হতে পারে যে, আপনার উস্তাদ বাকর ইবনু ঈসা অন্য আরেক ব্যক্তি। তিনি চুপ করে থাকলেন। পরদিন তিনি আমাকে বললেন: আমি গতরাতে চিন্তা করে দেখেছি, বসরায় আমি ‘বাকর ইবনু ঈসা’ নামের ৬০ ব্যক্তির কাছ থেকে হাদীস শুনেছি![3]</p><p>মিথ্যার বাহাদুরি দেখুন! হাদীসের ‘নকিদ’ ইমামদের কাছে এ ধরনের ‘ঠান্ডা’ মিথ্যার কোনো মূল্য নেই। বসরায় কোন্ যুগে কতজন ‘রাবী’ ছিলেন নামধামসহ তাদের বর্ণিত হাদীস তারা সংগ্রহ ও সংকলিত করেছেন। এজন্য এরা অনেক সময় এঁদের কাছে জালিয়াতি স্বীকার করতে বাধ্য হতো।</p><p>চতুর্থ শতকের অন্যতম মুহাদ্দিস আব্দুল্লাহ ইবনু আদী (৩৬৫ হি) বলেন, হাদীস সংগ্রহের সফরে যখন হার্রান শহরে ছিলাম তখন আবু আরূবার মাজলিসে আবু আব্দুল্লাহ নাহাওয়ান্দী বলেন, আমি গুলাম খালীলকে বললাম, শ্রোতাদের হৃদয়-কাড়া যে হাদীসগুলো বলছেন সেগুলো কোথায় পেলেন? তিনি বলেন: মানুষের হৃদয় নরম করার জন্য আমি এগুলো বানিয়েছি।[4]</p><p>এ সকল নেককার মানুষের জালিয়াতির ক্ষতি সম্পর্কে হাদীস শাস্ত্রের সকল ইমামই আলোচনা করেছেন। ইতোপূর্বে আমরা এ বিষয়ে ইবনুস সালাহ, নাবাবী ও ইরাকীর বক্তব্য দেখেছি। এ বিষয়ে আল্লামা সাইয়্যেদ শরীফ জুরজানী হানাফী (৮১৬ হি.) লিখেছেন: ‘‘মাওযূ বা বানোয়াট হাদীসের প্রচলনে সবচেয়ে ক্ষতি করেছেন দুনিয়াত্যাগী দরবেশগণ, তাঁরা অনেক সময় সাওয়াবের নিয়্যাতেও মিথ্যা হাদীস বানিয়ে বলেছেন।’’[5]</p><p>ইবন হাজার আসকালানী (৮৫২ হি.) বলেন : ‘‘বর্ণিত আছে যে, কোনো কোনো সূফী সাওয়াবের বর্ণনায় ও পাপাচারের শাস্তির বর্ণনায় মিথ্যা হাদীস বানানো ও প্রচার করা জায়েয বলে মনে করতেন।’’[6]</p><p>সুয়ূতী (৯১১ হি) বলেন, জালিয়াতির উদ্দেশ্য অনুসারে মিথ্যাবাদী জালিয়াতগণ বিভিন্ন প্রকারের। এদের মধ্যে সবচেয়ে মারাত্মক ও ক্ষতিকর ছিলেন কিছু মানুষ যাদেরকে সংসারত্যাগী নির্লোভ নেককার বলে মনে করা হতো। তাঁরা তাঁদের বিভ্রান্তির কারণে আল্লাহর কাছে সাওয়াব পাওয়ার আশায় মিথ্যা হাদীস বানাতেন।… (২য় শতকের প্রখ্যাত দরবেশ) আবু দাউদ নাখয়ী সুলাইমান ইবনু আমর রাত জেগে তাহাজ্জুদ আদায়ে ও দিনের পর দিন নফল সিয়াম পালনে ছিলেন অতুলনীয়। তা সত্ত্বেও তিনি মিথ্যা হাদীস বানিয়ে প্রচার করতেন।… আবু বিশর আহমাদ ইবনু মুহাম্মাদ আল-মারওয়াযী খোরাসানের অন্যতম ফকীহ, আবিদ ও সুন্নাতের সৈনিক ছিলেন। সুন্নাতের পক্ষে এবং বিদ‘আত ও বিদ‘আতপন্থীদের বিরুদ্ধে তিনি ছিলেন খড়গহস্ত। কিন্তু তিনি মিথ্যা কথাকে হাদীসের নামে প্রচার করতেন। … ওয়াহ্ব ইবনু ইয়াহইয়া ইবনু হাফস (২৫০ হি) তার যুগের অন্যতম নেককার আবিদ ও ওয়ায়িয ছিলেন। ২০ বছর তিনি কারো সাথে কোনো জাগতিক কথা বলেন নি। তিনিও হাদীসের নামে জঘন্য মিথ্যা কথা বলতেন।[7]</p><p>আল্লামা আলী কারী (১০১৪ হি.) লিখেছেন: অত্যধিক ইবাদত বন্দেগিতে লিপ্ত সংসারত্যগী দরবেশগণ শবে-বরাতের নামায, রজব মাসের নামায ইত্যাদি বিভিন্ন ফযীলতের বিষয়ে অনেক বানোয়াট কথা হাদীস নামে প্রচার করেছেন। তাঁরা মনে করতেন এতে তাঁদের সাওয়াব হবে, দীনের খেদমত হবে। বানোয়াট হাদীসের ক্ষেত্রে নিজেদের এবং অন্যান্য মুসলমানদের সবচেয়ে বেশি ক্ষতি করেছেন এ সকল মানুষ। তাঁরা এ কাজকে নেককাজ ও সাওয়াবের কাজ মনে করতেন, কাজেই তাঁদেরকে কোনো প্রকারেই বিরত রাখা সম্ভব ছিল না। অপরদিকে তাঁদের নেককর্ম, সততা, ইবাদত বন্দেগি ও দরবেশীর কারণে সাধারণ মুসলিম ও আলিমগণ তাঁদের ভালবাসতেন ও অত্যন্ত শ্রদ্ধা করতেন। তাঁদের কথাবার্তা আগ্রহের সাথে গ্রহণ করতেন ও বর্ণনা করতেন। অনেক সময় ভালো মুহাদ্দিসও তাঁদের আমল আখলাকে ধোঁকা খেয়ে তাঁদের বানোয়াটি ও মিথ্যা হাদীস অসতর্কভাবে গ্রহণ করে নিতেন।[8]</p><p><em>[1] সূরা (৫) মায়িদা: আয়াত ৭৭।</em></p><p><em>[2] ইবনুল জাওযী, আল-মাউদূআত ১/১৮; যাহাবী, মীযানুল ই’তিদাল ৭/৫৫-৫৭।</em></p><p><em>[3] যাহাবী, মীযানুল ই’তিদাল ১/২৮৫।</em></p><p><em>[4] ইবনু আদী, আল-কামিল ১/১৯৫।</em></p><p><em>[5] আব্দুল হাই লাখনবী, যাফরুল আমানী ফী মুখতাসারিল জুরজানী, ৪৩৩ পৃ:।</em></p><p><em>[6] মোললা আলী কারী, শারহু শারহি নুখবাতিল ফিকার, পৃ: ৪৫১।</em></p><p><em>[7] সুয়ূতী, তাদরীবুর রাবী ১/২৮১-২৮৩।</em></p><p><em>[8] মোললা আলী কারী, শারহু শারহি নুখবাতুল ফিকর, পৃ: ৪৪৭-৪৪৮।</em></p><blockquote>Article from হাদীসের নামে জালিয়াতি by ড. খোন্দকার আব্দুল্লাহ জাহাঙ্গীর (রহ.)</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4b78fba4fbbb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Database Connection Optimization in Azure Functions]]></title>
            <link>https://medium.com/@mazhar/database-connection-optimization-in-azure-functions-341bea8af892?source=rss-64c2f9b495c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/341bea8af892</guid>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[optimization]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[cosmosdb]]></category>
            <category><![CDATA[function]]></category>
            <dc:creator><![CDATA[Mazhar Ahmed]]></dc:creator>
            <pubDate>Wed, 14 Feb 2024 05:05:48 GMT</pubDate>
            <atom:updated>2024-02-14T05:05:48.469Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*2jS3J69_M4w5EIAB" /><figcaption>Photo by <a href="https://unsplash.com/@casparrubin?utm_source=medium&amp;utm_medium=referral">Caspar Camille Rubin</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>A few days ago we were building a solution for our client. We use Azure as our cloud provider. So, we decided to use Azure Functions and Azure Cosmos DB to build the solution using microservice architecture. We wrote our functions like this:</p><pre>namespace BMWSync.Functions<br>{<br>    public static class LocationFunction<br>    {<br><br>        [FunctionName(&quot;Location&quot;)]<br>        public static async Task&lt;List&lt;LocationResponse&gt;&gt; Run(<br>            [<br>                HttpTrigger(<br>                    AuthorizationLevel.Anonymous,<br>                    &quot;get&quot;,<br>                    &quot;post&quot;,<br>                    Route = null<br>                )<br>            ] HttpRequest req,<br>            ILogger log)<br>        {<br>            // log the URL<br>            log.LogInformation(req.Method, req.Path);<br><br>            BMWSyncDbContext _context = new BMWSyncDbContext();<br>            <br>            // rest of the code here ...<br>        }<br>    }<br>}</pre><p>Basically it was for syncing data from embed devices. So, the function was called almost once a second by a device. There were many devices. Let’s say there were 1 million devices. So, 1 million hit in a second was made at a time.</p><p>The problem was, for 1M hit, we were getting database connection time out. That was strange because we were using a very good production ready database with properly configured architecture. Then we found that for a single request there was a connection made to the DB. So, for 1M hit, there was 1M database connection made to the DB. That’s why we were getting database connection time out because we had almost 2K maximum connection limit.</p><p>The solution was if somehow we could use only one database connection for 1M hit, then it will be OK. So, we have updated our code like this:</p><pre>namespace BMWSync.Functions<br>{<br>    public static class LocationFunction<br>    {<br><br>        private static BMWSyncDbContext _context;<br><br>        [FunctionName(&quot;Location&quot;)]<br>        public static async Task&lt;List&lt;LocationResponse&gt;&gt; Run(<br>            [<br>                HttpTrigger(<br>                    AuthorizationLevel.Anonymous,<br>                    &quot;get&quot;,<br>                    &quot;post&quot;,<br>                    Route = null<br>                )<br>            ] HttpRequest req,<br>            ILogger log)<br>        {<br>            // log the URL<br>            log.LogInformation(req.Method, req.Path);<br><br>            _context = new BMWSyncDbContext();<br>            <br>            // rest of the code here ...<br>        }<br>    }<br>}</pre><p>The above code uses the same database connection when it’s hot reloaded. The connection is made when the function cold starts. So, as we had continuous traffic, our function is already in the hot or ready state. So, for 1M concurrent requests we only used one database connection.</p><p>Thus we solved the problem of DB connection timeout issue due to maximus connection.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=341bea8af892" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ricoh GRIII: A Pocketable Powerhouse for Street Photography]]></title>
            <link>https://medium.com/@mazhar/ricoh-griii-a-pocketable-powerhouse-for-street-photography-3bdca86f3b3f?source=rss-64c2f9b495c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/3bdca86f3b3f</guid>
            <category><![CDATA[digital-camera]]></category>
            <category><![CDATA[cameras]]></category>
            <category><![CDATA[ricoh]]></category>
            <category><![CDATA[photography]]></category>
            <category><![CDATA[review]]></category>
            <dc:creator><![CDATA[Mazhar Ahmed]]></dc:creator>
            <pubDate>Thu, 28 Dec 2023 20:50:20 GMT</pubDate>
            <atom:updated>2023-12-29T08:34:37.227Z</atom:updated>
            <content:encoded><![CDATA[<p>The Ricoh GR III is a compact camera that has taken the street photography world by storm. With its APS-C sensor, wide-angle lens, and excellent image quality, it’s a versatile tool that can capture stunning images in a variety of situations.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HDNwYmnN3rZ92ult9DZ4RQ.jpeg" /><figcaption>Image Credits: <a href="https://amateurphotographer.com/">https://amateurphotographer.com/</a></figcaption></figure><p>The Ricoh GR III has been my constant companion for the past few days, accompanying me on my strolls through the snow-covered streets of Finland. With one hand holding the camera and the other clutching a steaming cup of Starbucks Cafe Latte, I’ve captured the essence of this enchanting winter wonderland. Here are some of the key takeaways from my experience with this remarkable camera:</p><h3>Compact and inconspicuous design</h3><p>One of the GR III’s biggest strengths is its compact size and inconspicuous design. It’s small enough to fit comfortably in your pocket or bag, and its unassuming appearance makes it ideal for candid street photography.</p><h3>Excellent image quality</h3><p>The GR III is equipped with a 24.2MP APS-C sensor, which provides exceptional image quality. The images are sharp, detailed, and have excellent dynamic range. Even in low-light conditions, the GR III can produce clean, noise-free images.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8U3AjL0d7ZDrGY94UtMSNA.jpeg" /><figcaption>This is a photo taken in low light</figcaption></figure><h3>Fast and responsive autofocus</h3><p>The GR III’s autofocus system is incredibly fast and accurate. It can lock on to subjects in a matter of milliseconds, even in challenging lighting conditions. This makes the GR III perfect for capturing fleeting moments and spontaneous shots.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T1IDu_Z4LsGvk8ryo32Dog.jpeg" /><figcaption>Auto focus just works amazingly</figcaption></figure><h3>Versatile lens</h3><p>The GR III features a fixed 28mm equivalent lens, which is a great focal length for street photography. It’s wide enough to capture a wide range of subjects, but not so wide that it distorts your images. The lens is also very sharp and has minimal distortion.</p><h3>Touchscreen and intuitive controls</h3><p>The GR III features a touchscreen that makes it easy to navigate the menus and focus on subjects. The camera also has a number of intuitive physical controls that make it easy to adjust settings quickly.</p><h3>Built-in macro mode</h3><p>The GR III has a built-in macro mode that allows you to focus on subjects as close as 1 centimeter away. This makes it a great camera for taking close-up shots of flowers, insects, and other small objects.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_d-Zix99pQ7UfV74bJs7TQ.jpeg" /><figcaption>Snap Focus adds another dimension to the photography</figcaption></figure><h3>HDR mode</h3><p>The GR III has a built-in HDR mode that helps to improve dynamic range and reduce noise in high-contrast scenes. This is a great feature for shooting in challenging lighting conditions.</p><h3>RAW format support</h3><p>The GR III supports RAW format, which gives you more flexibility when editing your images. RAW files capture more image data than JPEGs, which allows you to adjust white balance, exposure, and other settings more precisely.</p><p>Overall, the Ricoh GR III is an excellent camera for street photography. It’s compact, inconspicuous, has excellent image quality, and is packed with features that make it a joy to use.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yXZvnD3H9J0FSpFRJK_cbw.jpeg" /></figure><h3>More Features:</h3><ul><li>No low-pass anti-aliasing filter for sharper images</li><li>3-axis in-body image stabilization system</li><li>On-sensor phase detection autofocus</li><li>3-inch touchscreen LCD with 1.04M-dot resolution</li><li>Built-in ND filter and macro mode</li><li>14-bit RAW files and in-camera RAW editing</li><li>Wi-Fi and Bluetooth connectivity</li><li>USB Type C port for charging</li></ul><p>Here are some of the pros and cons of the Ricoh GR III:</p><p><strong>Pros</strong></p><ul><li>Best for street photography</li><li>Good for daily life photography</li><li>Good for tourist</li><li>Large image sensor</li><li>Very sharp photo</li><li>Portable and lightweight</li><li>Compact and inconspicuous design</li><li>Excellent image quality and low-light performance</li><li>Fast and responsive autofocus</li><li>Versatile lens</li><li>Touchscreen</li><li>Intuitive controls</li><li>Built-in macro mode</li><li>HDR mode</li><li>RAW format support</li></ul><p><strong>Cons</strong></p><ul><li>Generates errors like chromatic aberration a bit more</li><li>Battery life is not so strong</li><li>No built-in flash</li><li>No weather sealing</li><li>Fixed lens</li><li>Relatively expensive</li><li>Video capability is not that good</li><li>No 4K video or tilt screen</li></ul><p>If you’re looking for a pocketable camera that can take stunning street photography images, the Ricoh GR III is an excellent choice. Checkout my album on Flickr <a href="https://flic.kr/s/aHBqjB7kAK">https://flic.kr/s/aHBqjB7kAK</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3bdca86f3b3f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[আমার ব্যবহৃত কুরআন অ্যাপ]]></title>
            <link>https://medium.com/@mazhar/%E0%A6%86%E0%A6%AE%E0%A6%BE%E0%A6%B0-%E0%A6%AC%E0%A7%8D%E0%A6%AF%E0%A6%AC%E0%A6%B9%E0%A7%83%E0%A6%A4-%E0%A6%95%E0%A7%81%E0%A6%B0%E0%A6%86%E0%A6%A8-%E0%A6%85%E0%A7%8D%E0%A6%AF%E0%A6%BE%E0%A6%AA-233cc7588c8a?source=rss-64c2f9b495c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/233cc7588c8a</guid>
            <category><![CDATA[islam]]></category>
            <category><![CDATA[quran]]></category>
            <category><![CDATA[surah]]></category>
            <category><![CDATA[apps]]></category>
            <dc:creator><![CDATA[Mazhar Ahmed]]></dc:creator>
            <pubDate>Mon, 26 Dec 2022 06:31:17 GMT</pubDate>
            <atom:updated>2025-03-02T20:05:18.844Z</atom:updated>
            <content:encoded><![CDATA[<p>আমার ফোনে সব সময় আমি কুরআন অ্যাপ রাখি। যেকোন সময় যেমন কুরআন তিলাওয়াত করা যায়, তেমন কুরআনের তাফসির দেখেও নেয়া যায়। বর্তমানে অনেকেই কুরআনের ভুল বিবৃতি দেয়, কাছে কুরআন অ্যাপ থাকলে চট করে দেখে নিয়ে সেটা যাচাই করা যায়। আমার হিসাবে কোন অ্যাপ পড়তে ভালো, কোনটা রিসার্চ করার জন্য ভালো আর কোনটা ভালো আরবি শেখার জন্য। এর দিকে হিসাব করে আমি তিনটা অ্যাপ বাছাই করেছি যা সকলেরই উপকার করবে</p><p><strong>তিলাওয়াত করার জন্যঃ</strong></p><figure><img alt="Bangla Quran -উচ্চারণসহ(কুরআন)" src="https://cdn-images-1.medium.com/max/480/1*-C2E86J68kU_a5KtRP8SiA.png" /><figcaption>Bangla Quran -উচ্চারণসহ(কুরআন)</figcaption></figure><p><a href="https://play.google.com/store/apps/details?id=com.kutblog.arabicbanglaquran">https://play.google.com/store/apps/details?id=com.kutblog.arabicbanglaquran</a><br>এই অ্যাপটাতে কুরআনের ফন্টগুলো অনেক সুন্দর। সেই সাথে আছে বাংলা উচ্চারন। যারা পরতে শুরু করেছেন এখনও স্বতঃস্ফূর্ত ভাবে পারেন না তারা উচ্চারন দেখে নিতে পারেন পড়ার সময়। সেই সাথে আছে বাংলা অর্থ। তাফসিরও আছে তবে তাফসিরের জন্য পরের অ্যাপটা বেশি ভালো। অনেকেই কুরআন পড়ার জন্য PDF ফাইল বেশি পছন্দ করে। তবে আমি অ্যাপ পছন্দ করি কেননা এখানে ইচ্ছা মত ফন্ট সাইজ পরিবর্তন করা যায় যা ফোনের ডিসপ্লেতে পঠনযোগ্যতা বাড়ায়।</p><p><strong>তাফসির পড়ার জন্যঃ</strong></p><figure><img alt="Quran Mazid (Tafsir &amp; ByWords)" src="https://cdn-images-1.medium.com/max/480/1*uISkfDWYJGSeBW5obwX9IQ.png" /><figcaption>Quran Mazid (Tafsir &amp; ByWords)</figcaption></figure><p><a href="https://play.google.com/store/apps/details?id=com.ihadis.quran">https://play.google.com/store/apps/details?id=com.ihadis.quran</a><br>এই অ্যাপটা তাফসির পড়ার জন্য অনেক ভালো। একই সাথে একাধিক অর্থ পাশাপাশি দেখার ব্যবস্থা আছে। সেই সাথে আছে অনেকগুলো তাফসির। সাথে অনেক আরবি ফন্ট আছে যা পছন্দ মতো পরিবর্তন করা যায়। কুরআন নিয়ে রিসার্চ করার জন্য এই অ্যাপটা বেস্ট কেননা সার্চ ফিচারও আছে এখানে।</p><p><strong>শব্দে শব্দে অর্থ বোঝার জন্যঃ</strong></p><figure><img alt="Al Quran (Tafsir &amp; by Word)" src="https://cdn-images-1.medium.com/max/480/1*sUDThoi7DYhAbtGtkBNMtw.png" /><figcaption>Al Quran (Tafsir &amp; by Word)</figcaption></figure><p><a href="https://play.google.com/store/apps/details?id=com.greentech.quran">https://play.google.com/store/apps/details?id=com.greentech.quran</a><br>এই অ্যাপটা শব্দে শব্দে আরবি বুঝার জন্য ভালো। এখানে বাংলা কোন তাফসির পাবেন না। তবে বাংলা অর্থ পাবেন। বিভিন্ন ফন্টে আরবি দেখতে পারবেন। যারা আরবি ব্যকরন শিখছেন অথবা আরবি শব্দ নিয়ে পড়ালেখা করছেন তারা এই অ্যাপটা থেকে অনেক উপকৃত হবেন।</p><p>এক একজনের এক একরকম মত হতেই পারে। উপরের অ্যাপগুলো নিয়ে আমার প্রকাশ করলাম। কারও যদি এতে কিছুটা হলেও উপকার হয় তাহলেই আমি সার্থক।</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=233cc7588c8a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Let’s create Morse Code using PERL]]></title>
            <link>https://medium.com/the-devs-tech/lets-create-morse-code-using-perl-22b6b832303?source=rss-64c2f9b495c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/22b6b832303</guid>
            <category><![CDATA[perl]]></category>
            <category><![CDATA[morse]]></category>
            <category><![CDATA[morse-code]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[raku]]></category>
            <dc:creator><![CDATA[Mazhar Ahmed]]></dc:creator>
            <pubDate>Thu, 30 Jul 2020 10:47:04 GMT</pubDate>
            <atom:updated>2023-12-29T00:21:32.998Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-7Le3UnRQE5NsuFaj2ghxg.png" /><figcaption>Image taken from Reddit</figcaption></figure><p>At the beginning of this article, we have two questions:<br>1) What is <strong>Morse Code</strong><br>2) Why <strong>PERL</strong>!</p><p><strong>Morse code </strong>is a method used in telecommunication to encode text characters as standardized sequences of two different signal durations, called dots and dashes or dits and dahs. Morse code is named after Samuel Morse, an inventor of the telegraph.</p><p>I want to use PERL because it comes built in with every Linux and Mac. I can just use the program without installing anything. Also PERL has a wide variety of features when we wanna handle string operations. PERL is a highly capable, feature-rich programming language with over 30 years of development. Years ago PERL 6 is released and soon after it’s renamed to Raku. Here, I’ll be using PERL 5 which comes built-in with all linux and mac.</p><p>You can find the list of Morse Code here <a href="http://www.sckans.edu/~sireland/radio/code.html">http://www.sckans.edu/~sireland/radio/code.html</a><br>Also you can learn it here <a href="http://www.learnmorsecode.com/">http://www.learnmorsecode.com</a></p><p>First let’s create an array with the code like:</p><pre># morse code list<br>my %letters;</pre><pre># First digits<br>$letters{&#39;0&#39;} = &#39;-----&#39;;<br>$letters{&#39;1&#39;} = &#39;.----&#39;;<br>$letters{&#39;2&#39;} = &#39;..---&#39;;<br>$letters{&#39;3&#39;} = &#39;...--&#39;;<br>$letters{&#39;4&#39;} = &#39;....-&#39;;<br>$letters{&#39;5&#39;} = &#39;....&#39;;<br>$letters{&#39;6&#39;} = &#39;-....&#39;;<br>$letters{&#39;7&#39;} = &#39;--...&#39;;<br>$letters{&#39;8&#39;} = &#39;---..&#39;;<br>$letters{&#39;9&#39;} = &#39;----.&#39;;</pre><pre># And now, letters<br>$letters{&#39;A&#39;} = &#39;.-&#39;;<br>$letters{&#39;B&#39;} = &#39;-..&#39;;<br>$letters{&#39;C&#39;} = &#39;-.-.&#39;;<br>$letters{&#39;D&#39;} = &#39;-..&#39;;<br>$letters{&#39;E&#39;} = &#39;.&#39;;<br>$letters{&#39;F&#39;} = &#39;..-.&#39;;<br>$letters{&#39;G&#39;} = &#39;--.&#39;;<br>$letters{&#39;H&#39;} = &#39;....&#39;;<br>$letters{&#39;I&#39;} = &#39;..&#39;;<br>$letters{&#39;J&#39;} = &#39;.---&#39;;<br>$letters{&#39;K&#39;} = &#39;-.-&#39;;<br>$letters{&#39;L&#39;} = &#39;.-..&#39;;<br>$letters{&#39;M&#39;} = &#39;--&#39;;<br>$letters{&#39;N&#39;} = &#39;-.&#39;;<br>$letters{&#39;O&#39;} = &#39;---&#39;;<br>$letters{&#39;P&#39;} = &#39;.--.&#39;;<br>$letters{&#39;Q&#39;} = &#39;--.-&#39;;<br>$letters{&#39;R&#39;} = &#39;.-.&#39;;<br>$letters{&#39;S&#39;} = &#39;...&#39;;<br>$letters{&#39;T&#39;} = &#39;-&#39;;<br>$letters{&#39;U&#39;} = &#39;..-&#39;;<br>$letters{&#39;V&#39;} = &#39;...-&#39;;<br>$letters{&#39;W&#39;} = &#39;.--&#39;;<br>$letters{&#39;X&#39;} = &#39;-..-&#39;;<br>$letters{&#39;Y&#39;} = &#39;-.--&#39;;<br>$letters{&#39;Z&#39;} = &#39;--..&#39;;<br>$letters{&#39; &#39;} = &#39;/&#39;;</pre><p>Now we can take a string and loop through it’s characters and make the morse code like:</p><pre>$string = uc $string;</pre><pre>for my $c (split //, $string) {<br>    print $letters{$c}, &quot; &quot;;<br>}</pre><pre>print &quot;\n&quot;;</pre><p><a href="https://gist.github.com/mazhar266/351ae7b5865dfc8c40cf826956d23ad1">I have created a gist here</a>. You can save the gist file as morse.pl and execute it like</p><pre>chmod +x morse.pl<br>./morse.pl &quot;SOS Help&quot;</pre><p>And the output is like</p><pre>... --- ... / .... . .-.. .--.</pre><p>That’s it, that’s how we can convert our text to morse code. The next thing you can enhance like convert morse code to text and adding sound support etc.</p><p>Good Luck.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=22b6b832303" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-devs-tech/lets-create-morse-code-using-perl-22b6b832303">Let’s create Morse Code using PERL</a> was originally published in <a href="https://medium.com/the-devs-tech">The Devs Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Let’s dockerize a Lapis service]]></title>
            <link>https://medium.com/the-devs-tech/lets-dockerize-a-lapis-service-b6ca9721c515?source=rss-64c2f9b495c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/b6ca9721c515</guid>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[docker-compose]]></category>
            <category><![CDATA[lapis]]></category>
            <category><![CDATA[lua]]></category>
            <category><![CDATA[openresty]]></category>
            <dc:creator><![CDATA[Mazhar Ahmed]]></dc:creator>
            <pubDate>Sat, 25 Jul 2020 10:13:25 GMT</pubDate>
            <atom:updated>2020-07-25T10:13:25.249Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/696/1*RdOfMMpda9l_q8bkk3PDRA.jpeg" /><figcaption>Photo Credit: Google Image Search</figcaption></figure><p>Lapis is a web framework specially for Lua language. It also supports Moon Script. It uses OpenResty (a customized Nginx which supports lua) to run the web service.</p><p>Lapis is a full fledged framework that supports PostgreSQL, SQLite etc. But maybe you will need to write many things on your own. That’s why I will always prefer to write small services using Lapis. I haven’t used it in production yet but I am planning to use it. Usually lapis apps are very fast.</p><p>Today I will guide you on installing lapis, creating a new project and dockerizing it. Current version of lapis is <a href="https://leafo.net/lapis/changelog.html"><strong>v1.8.1</strong></a><strong> </strong>which works on Lua 5.1. So, keep this in mind that <strong><em>latest version of Lua will not work with Lapis</em></strong><em>. </em>Also we will need OpenResty to run a Lapis service.</p><p>I’m using Ubuntu 20.04 LTS. So, let’s install Lua 5.1 first.</p><pre>sudo apt update<br>sudo apt install lua51</pre><p>And now install <strong>openresty</strong></p><pre>sudo apt install openresty</pre><p>To install Lapis we need <strong>luarocks</strong></p><pre>sudo apt install luarocks</pre><p>Now install Lapis</p><pre>sudo luarocks install lapis</pre><p>Now let’s create a new lapis project</p><pre>mkdir devstech<br>cd devstech<br>mkdir app<br>cd app<br>lapis new --lua --git</pre><p>The --lua argument will generate the project files in lua lang. And the --git will generate a .gitignore file.</p><p>Let’s see if our app runs properly</p><pre>lapis server</pre><p>And now the lapis server is on port 8080. Hit your browser at <a href="http://localhost:8080/">http://localhost:8080</a> . You can change the port by creating a new file named config.lua with the following content</p><pre>local config = require(&quot;lapis.config&quot;)<br><br>config(&quot;development&quot;, {<br>  port = 9090<br>})</pre><p>Now the lapis will start on port 9090.</p><p>So the project is running properly, let’s dockerize it. Create Dockerfile in the devstech/app folder and docker-compose.yml at the devstech folder. We will use lapis’s docker hub image. Let’s change the Dockerfile like:</p><pre># grab the image from docker hub<br>FROM mileschou/lapis:alpine</pre><pre># make a project folder<br>RUN mkdir /code<br>WORKDIR /code</pre><pre># copy the source files<br>COPY . .</pre><p>Now let’s change the docker-compose.yml like:</p><pre>version: &quot;3&quot;<br>services:<br>    app:<br>        image: lapis-demo:latest<br>        container_name: app<br>        restart: unless-stopped<br>        build:<br>            # build the image from Dockerfile<br>            context: ./app<br>        volumes:<br>            - ./app:/code<br>        command: lapis server<br>        ports:<br>            - &quot;9090:9090&quot;</pre><p>Now let’s build the image and run the container</p><pre>docker-compose build<br>docker-compose up</pre><p>Now hit your browser at the 9090 port.</p><p>That’s the way how we dockerize a lapis app. The source code from this tutorial is here: <a href="https://github.com/mazhar266/dockerized-lapis-boilerplate">https://github.com/mazhar266/dockerized-lapis-boilerplate</a></p><p>Thank you, see you next time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b6ca9721c515" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-devs-tech/lets-dockerize-a-lapis-service-b6ca9721c515">Let’s dockerize a Lapis service</a> was originally published in <a href="https://medium.com/the-devs-tech">The Devs Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cross platform App in wxWidgets]]></title>
            <link>https://medium.com/the-devs-tech/cross-platform-app-in-wxwidgets-a6b6f0680090?source=rss-64c2f9b495c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/a6b6f0680090</guid>
            <category><![CDATA[wxwidget]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[mac]]></category>
            <category><![CDATA[c-plus-plus-language]]></category>
            <category><![CDATA[make]]></category>
            <dc:creator><![CDATA[Mazhar Ahmed]]></dc:creator>
            <pubDate>Mon, 20 Apr 2020 17:39:39 GMT</pubDate>
            <atom:updated>2020-04-22T04:16:46.511Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://www.wxwidgets.org/">wxWidgets</a> is a C++ library used to make Windows, Mac, Linux and other platform apps with a single codebase. It’s a C++ library but can be used from <strong>Python</strong>, <strong>PERL</strong> <strong>Haskell</strong> and <strong>Ruby</strong> too. Obviously many people are using it from these languages rather than C++. You may already have seen softwares which are built on top of wxWidget like <a href="https://www.audacityteam.org/">Audacity</a>, <a href="https://www.ambiera.com/websitepainter">Website Painter</a> etc. You can find more <a href="https://www.wxwidgets.org/about/screenshots/">software built with it here</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/849/1*YbPrpJsraB5fVdoc2073fQ.png" /><figcaption>Audacity, a sound editing application built with wxWidgets</figcaption></figure><p>You may wonder why we are so much interested towards writing a single codebase for multiple platforms. Why don’t we use more than one codebase for Windows, Mac, Linux and even more. Cross platform app means less programmer, less budget, less time, less hassle. We can fix bugs in one codebase and it will be fixed in different platforms. There are many facilities using cross platform development. There are also cons of using it like if the library or framework contains bugs then your app will inherit that bugs too.</p><h4><strong>Installation</strong></h4><p>If you are using Windows OS then installation is easy. They provides installer for windows. You can download the installer from the downloads section of the website. You will also need a C++ compiler to compile source files. So, please install Visual Studio too.</p><p>For Mac and Linux, there is no installer. You might get it via the package manager in some Linux distros. Like in Ubuntu we can simply run</p><pre>sudo apt install libwxgtk3.0-gtk3-dev</pre><p>But you can always download the source and build. They (wxWidgets) also promote that as this way the build system will be configured automatically. To do so, download the tar.bz2 file from the site or github. extract to a place in your machine say /home/your-name/wxwidgets. You need a C++ build environment to built this source. In linux gcc/g++ comes built in. You will also need the build-essential and lib-gtk packages in Linux. Simply install them on Ubuntu or Debian:</p><pre>sudo apt update<br>sudo apt install build-essential<br>sudo apt install libgtk2.0-dev             <br>sudo apt install libgtk-3-dev</pre><p>On Centos, Amazon Linux, Fedora etc:</p><pre>sudo yum groupinstall &#39;Development Tools&#39;<br>sudo yum install gtk+-devel gtk2-devel gtk3-devel</pre><p>For the Arch, Architect, Manjaro etc, it’s already included with the base installation. But you can install dependant packages like:</p><pre>sudo pacman -Syy<br>sudo pacman -S libgtk2.0-dev<br>sudo pacman -S libgtk3-dev</pre><p>On Mac you need to install Xcode with the command line build tool. Simple download the Xcode from App Store or run in the terminal:</p><pre>xcode-select --install</pre><p>And now follow the GUI like clicking the install button etc.</p><p>Now that you have essential tools installed with a C++ compiler on your system, you can build wxWidgets from the source. Run these commands in the /home/your-name/wxwidgets folder to build and install (it will take <strong>20 ~ 60 minutes</strong> to complete the build process depending on your machine, and the process will eat your battery, so pls plug in your cable to a AC power source if you are using a laptop):</p><pre>./configure<br>make<br>sudo make install<br>make clean</pre><p>Also update the C++ library database on linux (Specially on Ubuntu) like:</p><pre>sudo updatedb<br>sudo ldconfig</pre><p>And now verify that if it is installed properly:</p><pre>wx-config --version</pre><h4><strong>Getting into xWidgets</strong></h4><p>I will be using a Mac for the rest of the article. For windows it’s the same just use Visual C++ compiler. I will make a new directory named the-devs-tech-wx in the folder I will make a new file named main.cpp which will be out main application class. Now let’s create a simple window with the title ‘The Devs Tech’. I will open the folder using VSCode by</p><pre>open . -a Visual\ Studio\ Code<br># or<br>open . -a &quot;Visual Studio Code&quot;</pre><p>Now At first I will open the main.cpp and add the header file for the wxWidgets.</p><pre>#include &lt;wx-3.0/wx/wxprec.h&gt;<br>#ifndef WX_PRECOMP<br>    #include &lt;wx-3.0/wx/wx.h&gt;<br>#endif</pre><p>Now I will inherit the wxApp class and make a new. Every app should do so</p><pre>class TheApp: public wxApp<br>{<br>    public:<br>    virtual bool OnInit();<br>};</pre><p>Now I will inherit the wxFrame because I want to show a window</p><pre>class TheFrame : public wxFrame<br>{<br>    public:<br>    TheFrame(<br>        const wxString &amp;title,<br>        const wxPoint &amp;pos,<br>        const wxSize &amp;size<br>    );</pre><pre>    private:<br>    void OnHello(wxCommandEvent &amp;event);<br>    void OnExit(wxCommandEvent &amp;event);<br>    void OnAbout(wxCommandEvent &amp;event);</pre><pre>    wxDECLARE_EVENT_TABLE();<br>};</pre><p>Every menu should have an unique ID. That’s why I will now make an unique ID for the menu</p><pre>enum<br>{<br>    MENU_ID = 1 // or anything you want<br>};</pre><p>Now let’s bind events to the common menus like</p><pre>wxBEGIN_EVENT_TABLE(TheFrame, wxFrame)<br>    EVT_MENU(MENU_ID, TheFrame::OnHello)<br>    EVT_MENU(wxID_EXIT, TheFrame::OnExit)<br>    EVT_MENU(wxID_ABOUT, TheFrame::OnAbout)<br>wxEND_EVENT_TABLE()</pre><pre>wxIMPLEMENT_APP(TheApp);</pre><p>Let’s init the window now</p><pre>bool TheApp::OnInit()<br>{<br>    TheFrame *frame = new TheFrame(<br>        &quot;The Devs Tech&quot;,<br>        wxPoint(50, 50),<br>        wxSize(450, 340)<br>    );</pre><pre>    frame-&gt;Show(true);</pre><pre>    return true;<br>}</pre><p>Now in the constructor of the window let’s write some elements</p><pre>TheFrame::TheFrame(const wxString &amp;title, const wxPoint &amp;pos, const wxSize &amp;size)<br>    : wxFrame(NULL, wxID_ANY, title, pos, size)<br>{<br>    wxMenu *menuFile = new wxMenu;<br>    menuFile-&gt;Append(<br>        MENU_ID,<br>        &quot;&amp;Hello...\tCtrl-H&quot;,<br>        &quot;Help string shown in status bar for this menu item&quot;<br>    );</pre><pre>    menuFile-&gt;AppendSeparator();<br>    menuFile-&gt;Append(wxID_EXIT);<br>    wxMenu *menuHelp = new wxMenu;<br>    menuHelp-&gt;Append(wxID_ABOUT);<br>    wxMenuBar *menuBar = new wxMenuBar;<br>    menuBar-&gt;Append(menuFile, &quot;&amp;File&quot;);<br>    menuBar-&gt;Append(menuHelp, &quot;&amp;Help&quot;);<br>    SetMenuBar(menuBar);<br>    CreateStatusBar();<br>    SetStatusText(&quot;Welcome from The Devs Tech!&quot;);<br>}</pre><p>Now let’s define the button events we declared earlier</p><pre>void TheFrame::OnExit(wxCommandEvent &amp;event)<br>{<br>    Close(true);<br>}</pre><pre>void TheFrame::OnAbout(wxCommandEvent &amp;event)<br>{<br>    wxMessageBox(<br>        &quot;This is a wxWidgets sample by The Devs Tech&quot;,<br>        &quot;About&quot;,<br>        wxOK | wxICON_INFORMATION<br>    );<br>}</pre><pre>void TheFrame::OnHello(wxCommandEvent &amp;event)<br>{<br>    wxLogMessage(&quot;Hello world from The Devs Tech!&quot;);<br>}</pre><p>Our window is complete. Let’s compile it now</p><pre>g++ `wx-config --cxxflags --libs` main.cpp</pre><p>wx-config is a helpful tool which helps list / return the libraries and options for <strong>wxWidgets</strong> on your system. Here wx-config --cxxflags --libs returns needed flags and libraries to compile the file. So the output executable file is a.out (It is platform dependant, for windows it will not be a.out). Let’s run it</p><pre>./a.out</pre><p>And our window will be shown in a moment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8uZSIzzn6maLlhwqqx0HJg.png" /><figcaption>the window after compilation and running</figcaption></figure><h4>Enhancement</h4><p>Now we can add other enhancement to the window like add buttons and other controls. We can also add some built tool support like cmake, make etc. We can add README.md and other files too. We can make a nice directory structure for our project like a folder for the assets, image etc.</p><p><strong>Source code used in this article is here </strong><a href="https://github.com/mazhar266/Sample-wxWidgets-Window">https://github.com/mazhar266/Sample-wxWidgets-Window</a></p><p>That’s all for this article. In the next article we will see how to use other languages instead of C++ to reduce written codes.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a6b6f0680090" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-devs-tech/cross-platform-app-in-wxwidgets-a6b6f0680090">Cross platform App in wxWidgets</a> was originally published in <a href="https://medium.com/the-devs-tech">The Devs Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Python fabric to shell script]]></title>
            <link>https://medium.com/the-devs-tech/python-fabric-to-shell-script-2e89efaf929c?source=rss-64c2f9b495c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/2e89efaf929c</guid>
            <category><![CDATA[shell-script]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[ssh]]></category>
            <category><![CDATA[shell]]></category>
            <category><![CDATA[deploy]]></category>
            <dc:creator><![CDATA[Mazhar Ahmed]]></dc:creator>
            <pubDate>Wed, 15 Apr 2020 18:07:19 GMT</pubDate>
            <atom:updated>2020-04-17T05:33:01.344Z</atom:updated>
            <content:encoded><![CDATA[<p>Previously in <a href="https://medium.com/the-devs-tech/automate-boring-stuffs-python-fabric-ccaa5c4bcbb">Automate boring stuffs, Python Fabric</a> we saw how to automate the deployments using Python Fabric. But today, we are going to learn how to do the similar thing using just the shell script.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DYF1zSxB5Y09fta30qsaTw.jpeg" /><figcaption>Simple life of a programmer is a dream</figcaption></figure><p>The reason for using shell script is that, you don’t need anything to run it. It can be run without any hassle and any package installation. Let’s see a simple <em>fabfile.py</em> from the previous article.</p><pre>from fabric import Connection</pre><pre>try:<br>    print(&quot;Connecting to server&quot;)<br>    conn = Connection(<br>        host=&quot;<strong>ec2-x-x-x-x-region.compute.amazonaws.com</strong>&quot;,<br>        user=&quot;<strong>ec2-user</strong>&quot;,<br>        connect_kwargs={<br>            &quot;key_filename&quot;: &quot;<strong>x-x-x-x.pem</strong>&quot;,<br>        }<br>    )<br>    print(&quot;Successfully connected&quot;)<br>    # <strong>TODO</strong>: write your commands here<br>    print(&quot;Deployment was successful&quot;)</pre><pre>except Exception as e:<br>    print(&quot;Deployment was unsuccessful.\nError:\n&quot;)<br>    print(e)</pre><p>So, here we are connecting to the host and running some commands. Let’s do the similar using shell script.</p><pre><em>#!/bin/bash</em><br>ssh <strong>ec2-user</strong>@<strong>ec2-x-x-x-x-region.compute.amazonaws.com </strong>-i <strong>x-x-x-x.pem</strong> &#39;<br>echo Successfully connected<br># TODO: write your commands here<br>echo Deployment was successful<br>&#39;</pre><p>You may wonder that if you need to run any command with a <strong>sudo</strong> what to do! It’s also simple if you use -s flag with sudo like:</p><pre><em>#!/bin/bash</em><br>ssh ec2-user@ec2-x-x-x-x-region.compute.amazonaws.com -i x-x-x-x.pem &#39;<br>echo Successfully connected<br><strong>echo {:your-password} | sudo -S service nginx restart</strong><br>echo Deployment was successful<br>&#39;</pre><p>For the last couple of days I’m simplifying the deployments for my team and I came up with writing all the deployment code to a file in the server named deploy.sh in the home folder and deploy like this:</p><p>ssh -p port user@server -i ssh-key.pem &#39;./deploy.sh&#39;</p><p>Now my team can deploy anything anywhere from just one command without even installing anything.</p><p>Thanks a lot, that’s all for today. In the next tutorial we will see many more things to do with shell script and python fabric.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2e89efaf929c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/the-devs-tech/python-fabric-to-shell-script-2e89efaf929c">Python fabric to shell script</a> was originally published in <a href="https://medium.com/the-devs-tech">The Devs Tech</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[When to say no to projects]]></title>
            <link>https://medium.com/@mazhar/when-to-say-no-to-projects-c805f1102606?source=rss-64c2f9b495c5------2</link>
            <guid isPermaLink="false">https://medium.com/p/c805f1102606</guid>
            <category><![CDATA[management]]></category>
            <category><![CDATA[client-relationship]]></category>
            <category><![CDATA[clients]]></category>
            <category><![CDATA[projects]]></category>
            <category><![CDATA[it]]></category>
            <dc:creator><![CDATA[Mazhar Ahmed]]></dc:creator>
            <pubDate>Mon, 16 Mar 2020 09:42:59 GMT</pubDate>
            <atom:updated>2020-03-16T09:42:59.102Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*c1XUhXETqH5A7_TLEC0zOQ.png" /><figcaption>Saying No is a great skill</figcaption></figure><p>This article is for the startups and small teams only. Handling clients and projects for corporate is a different level of art and I don’t want to discuss about that here. I will mention some points for the small teams, so that it will be easy for them to understand the small clients. Small teams need to be more careful because one project failure might end up closing the organization. Risk assessment is very crucial part of project and organization management. I know, no one listens before facing the real problem. I’m just interested to share my own thoughts.</p><p><strong>When to say no to the upcoming projects:</strong></p><ul><li>Budget for the project is low</li><li>Pressure of the work is very high</li><li>Workforce for the project is less than expected</li><li>Client does not behave well</li><li>Client things he knows everything of the project</li><li>If client says they will work on many projects in future</li><li>Client continuously tells to reduce cost</li><li>Client repeatedly blackmails telling about religional stuffs</li><li>If any of your enemy is present in the client body</li><li>If you don’t have the same amount of hand cash as the project budget</li><li>If the client is your relative (trust me, you will have hard time just to keep the relation)</li><li>If your client has a bad history in the market</li><li>If client wants to work with your team</li><li>If client wants to assign his own managers</li><li>If client wants to know every details about your team or company secrets</li><li>If this project has a bad history of failing</li><li>If it is only for maintenance of the existing project</li><li>If it is a non profit project for future development (if it is yours, then OK)</li><li>Your client wants to pay in anything else other than money</li></ul><p><strong>When to stop / postpone the projects</strong></p><ul><li>If you can not lock the project specifications</li><li>If you don’t get the upfront</li><li>If you don’t get the promised payment on due date</li><li>If your client is a miser person</li><li>If your client is a crooked man</li><li>If you can not hire enough people to work with</li><li>Sudden requirement, technology etc change, ie. use Java instead of Python</li><li>Sudden market change, ie. there is no iOS engineer</li></ul><p><strong>What to do for the new project</strong></p><ul><li>Document everything, even a little pin drop</li><li>Fix the requirement and lock that</li><li>Make an acceptance criteria (it’s very very important)</li><li>Maintain a proper communication</li><li>Slowly increase the relationship with your client</li><li>Take upfront payment, don’t work before taking it</li><li>Ensure quality of your deliverables</li><li>Charge for new changes measured by your company hours</li><li>Don’t handover anything before the final payment</li><li>Plan for win-win situation about the milestones and payments</li><li>Never miss a meeting with the client, reschedule it if needed</li><li>Make the deed in a way, if project fails, no cash will be back</li></ul><p>The summary is you need to understand the project heat and decrease every possible way of project failure. Experienced managers can understand the project’s risk factor before starting a project, So, hiring experience managers might be your first step of risk management.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c805f1102606" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>