<?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 Mafidul Haque on Medium]]></title>
        <description><![CDATA[Stories by Mafidul Haque on Medium]]></description>
        <link>https://medium.com/@haquemafidul786?source=rss-a0880674df4b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*XyHqhfsqrukivq3K</url>
            <title>Stories by Mafidul Haque on Medium</title>
            <link>https://medium.com/@haquemafidul786?source=rss-a0880674df4b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 29 Nov 2026 03:44:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@haquemafidul786/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[GitHub Copilot:- Spec Driven Development(SDD)]]></title>
            <link>https://medium.com/@haquemafidul786/github-copilot-spec-driven-development-sdd-rethinking-the-software-development-life-cycle-7707ef137929?source=rss-a0880674df4b------2</link>
            <guid isPermaLink="false">https://medium.com/p/7707ef137929</guid>
            <category><![CDATA[microsoft-copilot]]></category>
            <category><![CDATA[github-copilot]]></category>
            <category><![CDATA[github-copilot-sdd]]></category>
            <category><![CDATA[generative-ai-use-cases]]></category>
            <category><![CDATA[ai-agent]]></category>
            <dc:creator><![CDATA[Mafidul Haque]]></dc:creator>
            <pubDate>Sun, 02 Aug 2026 17:38:04 GMT</pubDate>
            <atom:updated>2026-08-02T17:49:12.896Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>GitHub Copilot:- Spec Driven Development(SDD)</strong></p><p>Rethinking the Software Development Life Cycle (SDLC) with GitHub Copilot’s Spec-Driven Development (SDD) approach.</p><p>AI coding assistants are most effective when they operate from a clear, shared specification rather than just autocompleting code. Here’s how the architecture integrates Copilot into every phase of the SDLC:</p><p>1. Specification: Define requirements and acceptance criteria with Copilot assisting in drafting.<br>2. Planning: Break down architecture and tasks, with Copilot proposing the structure.<br>3. Design: Create API contracts and data models, as Copilot scaffolds schemas.<br>4. Implementation: Generate code directly from the specification using Agent Mode.<br>5. Testing: Map test cases to acceptance criteria, with Copilot generating tests.<br>6. Review &amp; Deploy: Ensure pull requests are reviewed for specification compliance before shipping.<br>Feedback: Incorporate learnings back into the specification, creating a continuous cycle.</p><p>The core idea is that the specification serves as the single source of truth, not an afterthought. Every commit, test, and pull request traces back to it, resulting in less rework and tighter alignment between requests and deliverables.</p><p>Curious to learn how teams are adapting their SDLC for AI-native development and how they are structuring this process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TLOZWr7ZgOmit1ZN" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7707ef137929" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[# Java Design Patterns, Visually Explained]]></title>
            <link>https://medium.com/@haquemafidul786/java-design-patterns-visually-explained-91961f043f22?source=rss-a0880674df4b------2</link>
            <guid isPermaLink="false">https://medium.com/p/91961f043f22</guid>
            <category><![CDATA[java-design-pattern]]></category>
            <dc:creator><![CDATA[Mafidul Haque]]></dc:creator>
            <pubDate>Wed, 01 Jul 2026 17:45:13 GMT</pubDate>
            <atom:updated>2026-07-08T06:22:37.007Z</atom:updated>
            <content:encoded><![CDATA[<p><em>*8 patterns everyone actually uses — with a diagram, a real-life analogy, and working code for each one.*</em></p><p>Design patterns get a bad reputation because they’re usually taught with dry UML and no context. Here’s the fix: for each pattern below, you get <strong>**one picture, one everyday analogy, and one short code example**</strong> — that’s it. No fluff.</p><p>Attach each PNG image (included alongside this file) at the matching spot when you paste this into the Medium editor.</p><p><strong>— -</strong></p><p><strong>## 1. Singleton — “There’s only one President”</strong></p><p><strong>**Analogy:**</strong> No matter who asks, there’s only ever one sitting President at a time. Everyone who asks “who’s in charge?” gets pointed to the same person.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U1UyR3O1baAXecncuu9vLQ.png" /></figure><p><strong>**When to use it:**</strong> A shared resource that must not be duplicated — a config store, a logging service, a connection pool.</p><p>public class ConfigManager {</p><p>private static volatile ConfigManager instance;</p><p>private final Map&lt;String, String&gt; settings = new HashMap&lt;&gt;();</p><p>private ConfigManager() {</p><p>settings.put(“env”, “production”);</p><p>}</p><p>public static ConfigManager getInstance() {</p><p>if (instance == null) {</p><p>synchronized (ConfigManager.class) {</p><p>if (instance == null) instance = new ConfigManager();</p><p>}</p><p>}</p><p>return instance;</p><p>}</p><p>}</p><p><strong>## 2. Factory Method — “Ordering at a car dealership”</strong></p><p><strong>**Analogy:**</strong> You tell the dealership “I want a sedan” or “I want a truck.” You don’t build the car yourself — a specific factory line does, based on what you asked for.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4lZUtOVVj7WUojtfC-zmFQ.png" /></figure><p><strong>**When to use it:**</strong> You have a family of related objects, and the exact type to create depends on input or context.</p><p>abstract class VehicleFactory {</p><p>abstract Vehicle createVehicle();</p><p>}</p><p>class SedanFactory extends VehicleFactory {</p><p>Vehicle createVehicle() { return new Sedan(); }</p><p>}</p><p>class TruckFactory extends VehicleFactory {</p><p>Vehicle createVehicle() { return new Truck(); }</p><p>}</p><p><strong>## 3. Builder — “Building a custom pizza”</strong></p><p><strong>**Analogy:**</strong> You don’t hand the chef 10 ingredients at once. You say “large,” then “add cheese,” then “add pepperoni,” then “done” — building it up one step at a time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oP0nkbysI27ZQRuAZIOKxQ.png" /></figure><p><strong>**When to use it:**</strong> An object has many optional fields, and a giant constructor would be unreadable.</p><p>Pizza pizza = new Pizza.Builder()</p><p>.size(“Large”)</p><p>.cheese(true)</p><p>.pepperoni(true)</p><p>.build();</p><p><strong>## 4. Adapter — “A power plug converter”</strong></p><p><strong>**Analogy:**</strong> Your laptop charger has a US plug, but the wall socket is European. You don’t rebuild the charger — you plug in an adapter that translates one shape into the other.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D2bi5ZVTm0SKCBA46BXPGw.png" /></figure><p><strong>**When to use it:**</strong> You’re stuck with a third-party or legacy class whose interface doesn’t match what your code expects.</p><p>class PrinterAdapter implements ModernPrinter {</p><p>private final LegacyPrinter legacyPrinter;</p><p>PrinterAdapter(LegacyPrinter legacyPrinter) { this.legacyPrinter = legacyPrinter; }</p><p>public void print(String text) { legacyPrinter.printOldFormat(text); }</p><p>}</p><p><strong>## 5. Decorator — “Customizing your coffee order”</strong></p><p><strong>**Analogy:**</strong> You start with a plain coffee, then wrap it with milk, then wrap that with sugar. Each add-on wraps the previous one and adds its own cost — without changing the original coffee class.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*R49QO13unSoCZPsL16bUMw.png" /></figure><p><strong>**When to use it:**</strong> You want to add features to an object dynamically, without a explosion of subclasses for every combination.</p><p>Coffee order = new SugarDecorator(new MilkDecorator(new SimpleCoffee()));</p><p>System.out.println(order.description() + “ = $” + order.cost());</p><p>// Coffee + Milk + Sugar = $2.70</p><p><strong>## 6. Facade — “One button to start your computer”</strong></p><p><strong>**Analogy:**</strong> Pressing the power button feels simple, but behind it the CPU starts, memory loads, and the hard drive spins up. The facade hides that complexity behind one clean action.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AUCWA0eJejEQCjSM6aZYvg.png" /></figure><p><strong>**When to use it:**</strong> A subsystem has many moving parts, but most callers only need one simple entry point.</p><p>class ComputerFacade {</p><p>private final CPU cpu = new CPU();</p><p>private final Memory memory = new Memory();</p><p>private final HardDrive hardDrive = new HardDrive();</p><p>public void start() {</p><p>cpu.start();</p><p>memory.load();</p><p>hardDrive.spin();</p><p>}</p><p>}</p><p><strong>## 7. Observer — “Subscribing to notifications”</strong></p><p><strong>**Analogy:**</strong> When an order ships, everyone who subscribed — email, SMS, push notification — gets notified automatically. The order doesn’t need to know who’s listening, just that it should announce the event.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KP2oRpqImSsJq4AeD_xK8w.png" /></figure><p><strong>**When to use it:**</strong> One event needs to trigger reactions in several unrelated places — the backbone of event-driven and reactive systems.</p><p>class OrderSubject {</p><p>private final List&lt;Observer&gt; observers = new ArrayList&lt;&gt;();</p><p>public void subscribe(Observer o) { observers.add(o); }</p><p>public void placeOrder() {</p><p>for (Observer o : observers) o.update(“Order placed”);</p><p>}</p><p>}</p><p><strong>## 8. Strategy — “Choosing how to pay at checkout”</strong></p><p><strong>**Analogy:**</strong> At checkout, you can pay by credit card, PayPal, or crypto. The cart doesn’t care which one — it just calls `pay()` on whichever strategy you picked.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Kq-ZqLkd-0ZgOTi9qyu3gw.png" /></figure><p><strong>**When to use it:**</strong> You have several interchangeable algorithms and want to pick one at runtime, without `if/else` chains scattered through your code.</p><p>```java</p><p>ShoppingCart cart = new ShoppingCart();</p><p>cart.setPaymentStrategy(new PayPalPayment());</p><p>cart.checkout(49.99);</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=91961f043f22" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>