<?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 Umair Zia on Medium]]></title>
        <description><![CDATA[Stories by Umair Zia on Medium]]></description>
        <link>https://medium.com/@umairzia71?source=rss-cd81104f6d4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*_VwBZuOU7NwGEFH15pYytQ.jpeg</url>
            <title>Stories by Umair Zia on Medium</title>
            <link>https://medium.com/@umairzia71?source=rss-cd81104f6d4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 22:25:53 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@umairzia71/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[After the Midterms: What a Democratic Congress Means for Pakistan’s Economy]]></title>
            <link>https://medium.com/@umairzia71/after-the-midterms-what-a-democratic-congress-means-for-pakistans-economy-97fcd5d5d40f?source=rss-cd81104f6d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/97fcd5d5d40f</guid>
            <category><![CDATA[pakistan-politics]]></category>
            <category><![CDATA[pakistan]]></category>
            <category><![CDATA[finance]]></category>
            <category><![CDATA[predictions]]></category>
            <category><![CDATA[us-politics]]></category>
            <dc:creator><![CDATA[Umair Zia]]></dc:creator>
            <pubDate>Fri, 27 Nov 2026 00:27:08 GMT</pubDate>
            <atom:updated>2026-11-27T00:27:08.084Z</atom:updated>
            <content:encoded><![CDATA[<h3>Introduction</h3><p>In my view, the November 3 midterm result will affect Pakistan’s economy mainly through oil prices and the Iran war, and much less through any return of US aid. According to the Associated Press count as of November 16, Democrats won 256 House seats to the Republicans’ 169 and hold 55 Senate seats (including two independents who caucus with them) to 44. The new Congress will be sworn in on January 3, 2027, but Donald Trump keeps the presidency, the veto and control of foreign policy until January 2029.</p><p>The result comes at an awkward time for Islamabad, which spent the last two years building its Washington strategy around direct access to the White House, largely through army chief Field Marshal Asim Munir. That access helped Pakistan secure a lower tariff of 19% (down from 29%) in a <a href="https://aljazeera.com/news/2026/10/27/could-us-midterms-reshape-pakistans-relationship-with-washington">July 2025 trade deal</a>, a <a href="https://www.al-monitor.com/originals/2026/11/analysis-pakistans-leaders-dread-us-democrats-win-its-households-are-praying-it">$1.25 billion US EXIM loan</a> for the Reko Diq copper and gold project, and a role as mediator in the US-Iran talks. However, it has not yet produced the <a href="https://www.khaleejtimes.com/world/asia/pakistan-seeks-10-billion-fund-from-us-after-mediating-iran-talks-says-source">$10 billion exchange stabilization facility</a> that Pakistan requested from the US Treasury in July 2026.</p><p>This article seeks to analyze how the result may affect Pakistan’s public and private sectors, to help readers judge which outcomes are more likely. It covers four areas: the powers Congress actually holds, the prospects for US aid, how financial markets have reacted, and the Iran war. For this analysis, it was assumed that:</p><ul><li>Trump remains in office until 2029 and vetoes the bills he opposes, and an override requires two-thirds of both chambers (and therefore Republican votes).</li><li>The US-Iran standoff stays in its current “no war, no peace” state, with the US naval blockade in place and the Strait of Hormuz only partly usable.</li><li>Pakistan remains in its IMF program until the current arrangement expires in 2027.</li></ul><h3>What Congress can and cannot do</h3><p>The key point for Pakistani readers is that Congress can raise or lower the cost of a decision, but the president still makes most of the decisions that affect Pakistan directly. The table below sorts each lever by who holds it, based on the powers framework in my <a href="https://github.com/umairzia/USmidterms-2026-dashboard">US midterms 2026 dashboard</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*7d_Sl2BjvOX2a5AvFVk_0A.png" /><figcaption>Levers of controls and potential impacts on Pakistan</figcaption></figure><p>Two levers here deserve particular emphasis. Firstly, <a href="https://www.justsecurity.org/163835/democratic-congress-likely-do-foreign-policy/">Just Security</a> notes that Congress already passed a non-binding Iran war-powers measure that the administration ignored, so the sharper tool is appropriations language that bars funds for military operations in Iran. Secondly, <a href="https://arynews.tv/trumps-midterm-rebuke-gives-trading-partners-room-to-resist">Reuters</a> reports that Trump still controls tariff policy through executive authority, which means trade relief for Pakistan depends on the White House, not on the new majorities.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/617/1*IGr-tFr7vfVk5tjfUfIZ2g.png" /><figcaption>Flowchart of Midterm Impact on various factors</figcaption></figure><p>Each arrow in the above diagram is a logic chain. The oil channel in this case carries the largest effect, and the grey shaded band is the limit on all four: Congress can push certain levers, but the president still decides.</p><h3>Will aid come back?</h3><p>Some US money may return to Pakistan, but it is likely to be smaller, civilian and tied to conditions that Islamabad will find uncomfortable. To see why, one must separate what Democrats say about foreign aid in general from what they say about Pakistan in particular.</p><p><strong>What was lost.</strong> In early 2025 the US suspended more than $845 million in aid projects in Pakistan, pausing or ending 39 programs in health, education, democracy, the environment and humanitarian work. According to development practitioner Syed Ali Hameed, writing in <a href="https://www.thefridaytimes.com/09-Jul-2026/classrooms-copper-replaced-development-aid-pakistan">The Friday Times</a>, what replaced it was something very limited in scope e.g. a $5 million State Department grant aimed at protecting American access to critical minerals in Balochistan. In his words, “When aid begins to protect minerals rather than communities, development gives way to extraction.”</p><p>It’s better for our analysis to focus more on what Democrats say about aid in general vs what they say about Pakistan specifically. Let’s start with aid in general: Congress has already shown it will fund more than the White House asks for. In January 2026 a bipartisan package <a href="https://www.ksmu.org/2026-01-28/spending-package-restores-some-foreign-aid">allocated $50 billion for foreign aid</a>, including $9.4 billion for global health. By contrast, the administration’s FY2027 request would <a href="https://www.cgdev.org/blog/deep-cuts-new-directions-trumps-fy27-budget-and-future-us-foreign-assistance">cut flexible global health funding by nearly 46%</a> and eliminate Food for Peace, according to the Center for Global Development. A Democratic Congress will likely push the next budget closer to the January package than to the request.</p><p>What Democrats say about Pakistan? Here the signals turn negative for Pakistan’s leadership. In December 2025, <a href="https://tribune.com.pk/story/2580520/1">44 House Democrats</a> led by Pramila Jayapal and Greg Casar asked Secretary of State Marco Rubio for visa bans and asset freezes on officials responsible for rights abuses under Prime Minister Shehbaz Sharif and Field Marshal Munir, and for the release of Imran Khan. Mehlaqa Samdani of the Community Alliance for Peace and Justice wrote in <a href="https://fpif.org/the-false-promise-of-pakistans-military/">Foreign Policy in Focus</a> that more than 100 Democrats have signed such letters over two years, and that the new majorities can now attach conditions to appropriations and defense bills.</p><p>Put together, these signals form a clear chain of thought :</p><p>1. Democrats write a larger foreign aid budget than Trump requested.</p><p>2. The same bills carry Pakistan-specific conditions on human rights, political prisoners and the military’s role.</p><p>3. Money for Pakistan, if any, flows to health, education and civil society through NGOs and multilateral partners, not as budget support or security assistance.</p><p>4. The State Department under Trump still controls the pace of spending. <a href="https://www.ksmu.org/2026-01-28/spending-package-restores-some-foreign-aid">NPR</a> reports that analysts expect the administration may again ask Congress to rescind appropriated funds, as it did in 2025.</p><p>The scale also matters. Even a full restoration of the $845 million portfolio would equal less than a quarter of one month of remittances, which reached <a href="https://minutemirror.com.pk/overseas-pakistanis-send-3-9-billion-in-october-remittances-reach-14-8-billion-in-four-months-658904/">$3.9 billion in October 2026</a>. Aid shapes reputations and social programs, but it does not move Pakistan’s balance of payments.</p><p><strong>The $10 billion question.</strong> The larger prize is the exchange stabilization facility Finance Minister Muhammad Aurangzeb raised with Treasury Secretary Scott Bessent in July. A <a href="https://www.dawn.com/news/2042533">Dawn editorial</a> reads US hesitation over it as a possible early sign of cooler attitudes, and <a href="https://www.al-monitor.com/originals/2026/11/analysis-pakistans-leaders-dread-us-democrats-win-its-households-are-praying-it">Reuters</a> reports the request remains unanswered. Congress cannot approve or block it, but a Treasury facility for a government under Democratic scrutiny is a harder sell inside any administration. Hence the facility is now less likely than it was in July, though not off the table.</p><h3>Markets and the private sector</h3><p>Pakistani market analysts agree that a Democratic Congress is good for the private sector, but almost entirely because of oil and Iran, not because of US money. The Pakistan Stock Exchange gave its verdict quickly. On November 4 the KSE-100 rose <a href="https://tribune.com.pk/story/2638706/psx-soars-nearly-4000-points-in-euphoric-rally">3,994.62 points to 172,013.48</a>, and on November 10 it rose another <a href="https://tribune.com.pk/story/2639658/psx-jumps-5449-points-in-spectacular-rally">5,448.56 points to 179,335.24</a>, its first close above 175,000 since September 1st.</p><p>The analysts’ own words show what they were pricing:</p><p>• Saad Hanif, head of research at Ismail Iqbal Securities: “Investors read a Democratic sweep as positive for regional geopolitics,” with easing oil prices and inflation to follow (<a href="https://www.brecorder.com/news/40447354/psx-kse-100-accumulates-nearly-4000-points-as-investors-bet-on-us-midterms-iran-talks">Business Recorder</a>).</p><p>• Sana Tawfik, head of research at Arif Habib Limited, credited institutional buying, mainly by mutual funds, along with the US political shift and a draft US-Iran proposal (<a href="https://www.brecorder.com/news/40447354/psx-kse-100-accumulates-nearly-4000-points-as-investors-bet-on-us-midterms-iran-talks">Business Recorder</a>).</p><p>• Ali Najib, deputy head of trading at Arif Habib Limited, linked the November 10 rally to de-escalation hopes, while warning that “profit-taking may emerge at higher levels, keeping investors selective and cautious” (<a href="https://tribune.com.pk/story/2639658/psx-jumps-5449-points-in-spectacular-rally">The Express Tribune</a>).</p><p>• Ahmed Sheraz of KASB KTrade: “Going forward, easing oil prices and improving geopolitical sentiment could keep the outlook constructive” (<a href="https://tribune.com.pk/story/2638706/psx-soars-nearly-4000-points-in-euphoric-rally">The Express Tribune</a>).</p><p>One detail should temper the optimism. On November 4, foreign investors were <a href="https://tribune.com.pk/story/2638706/psx-soars-nearly-4000-points-in-euphoric-rally">net sellers of Rs1.16 billion</a> while local funds bought. One can deduce that the rally is a domestic bet on cheaper oil and lower interest rates, and not necessarily a sign that foreign capital expects new US support.</p><p>The mechanism runs through the import bill. Pakistan imports 80% to 85% of its petroleum, and <a href="https://www.nation.com.pk/13-Mar-2026/closure-strait-hormuz-may-raise-pakistan-s-monthly-oil-import-bill-dollar-3-5-dollar-4-5b-pide">PIDE estimates</a> that every $10 rise in oil adds $1.8 to 2.0 billion a year to that bill. Brent’s fall from $102 to $96 after the vote would therefore save roughly $1.1 to 1.2 billion a year, if the lower price holds. That relief feeds into various factors:</p><p>1. Inflation, which was <a href="https://www.bolnews.com/business/pakistans-inflation-eases-in-october-to-961">9.61% in October</a>, down from 10.26% in September, with core inflation at 7.8%.</p><p>2. The State Bank’s policy rate, raised by 50 basis points to 12% after oil topped $100. Former finance minister Miftah Ismail told <a href="https://www.thestar.com.my/business/business-news/2026/11/04/pakistans-rebound-masks-deeper-vulnerabilities">Bloomberg</a> that higher rates suppress demand and cost the economy growth and household income.</p><p>3. Credit and margins for the sectors that led the rally: banks, fertilizer, cement and power.</p><p>Exporters face a <a href="https://textalks.com/pakistan-pushes-us-textile-sales-as-new-10-tariff-raises-competitive-risk/">10% Section 301 duty</a> on most goods sent to the US since July 24, 2026, mandated by a forced-labor enforcement. It is an executive measure, so the new Congress cannot easily remove it. Also, Democrats have traditionally favored closer ties with India, as Kamran Yousaf notes in <a href="https://tribune.com.pk/story/2639321/pak-us-ties-after-the-midterm-jolt">The Express Tribune</a>, which offers Pakistani textiles no edge over Indian competitors facing the same 10% rate.</p><p>Some of the deals signed during Trump’s term are tied to his family or associates: a memorandum to explore payments in USD1, the stable coin issued by World Liberty Financial, a limited drone order from Powerus, and a memorandum on Manhattan’s Roosevelt Hotel. Daniel Markey of the Stimson Center told <a href="https://www.al-monitor.com/originals/2026/11/analysis-pakistans-leaders-dread-us-democrats-win-its-households-are-praying-it">Reuters</a> that investigations could damage the broader relationship if those deals appear driven by private interests. Companies in fintech, crypto and minerals should expect slower US partners and closer due diligence.</p><h3>De-escalation with Iran: the upside and the less obvious negatives</h3><p>An end to the Iran war would be the single largest gain Pakistan could draw from this election, but it would also strip away part of the leverage Islamabad has built in Washington. Both halves of that statement have strong implications.</p><p>As it stands currently, the war has moved from a state of open combat to a stalemate. Pakistan brokered a <a href="https://aljazeera.com/news/2026/10/27/could-us-midterms-reshape-pakistans-relationship-with-washington">ceasefire on April 8 and a 14-point Islamabad memorandum in June</a>, but the 60-day negotiating window expired in mid-August, and Field Marshal Munir’s fifth Tehran visit on October 20 brought no breakthrough. Brent peaked at <a href="https://aljazeera.com/news/2026/10/23/us-iran-war-then-and-now-how-the-landscape-has-changed-since-february">$126.41 on April 30</a> against $72.48 the day before the war began. As recently as November 11, <a href="https://www.iranintl.com/en/202611118522">Iran International</a> reported a tanker on fire after striking a mine east of Hormuz, with the US blockade still in place. Ghaith al-Omari of the Washington Institute, quoted by <a href="https://www.iranintl.com/en/202611118522">Iran International</a>, summed it up: “No war, no peace equals uncertainty, equals instability.”</p><p>At the same time, Congress can push for de-escalation. Former ambassador Ali Sarwar Naqvi told <a href="https://www.nation.com.pk/06-Nov-2026/us-midterm-fallout-islamabad-must-immediately-engage-democrats">The Nation</a> that it would be harder for Trump to launch another confrontation with Iran without political support in Congress. Voters themselves linked the war to prices, and Trump told <a href="https://www.fox13news.com/news/trump-admits-war-iran-contributed-midterm-election-results">Fox News</a>, “I think a part of it was Iran.” A deal that reopens Hormuz would help Pakistan in four ways:</p><p>1. Lower oil and LNG costs. Pakistan sources <a href="https://www.cnbc.com/2026/03/03/strait-of-hormuz-closure-which-countries-will-be-hit-the-most.html">99% of its LNG from Qatar and the UAE</a>, all of it through the strait.</p><p>2. Safer remittances. Saudi Arabia ($981.6 million) and the UAE ($815.9 million) were the two largest sources of <a href="https://minutemirror.com.pk/overseas-pakistanis-send-3-9-billion-in-october-remittances-reach-14-8-billion-in-four-months-658904/">October remittances</a>, and their economies employ Pakistani workers in the sectors hit hardest by Iranian strikes.</p><p>3. Cheaper fertilizer and freight, which feeds food inflation.</p><p>4. Room for the State Bank to cut rates, which the private sector needs more than any aid program.</p><p><strong>The less obvious negatives.</strong> One may argue that peace can only help Pakistan, but the logic is not so simple:</p><p>• <strong>The mediator premium shrinks.</strong> Pakistan’s elevated standing in Washington relies largely on its role as a channel to Tehran. <a href="https://www.al-monitor.com/originals/2026/11/analysis-pakistans-leaders-dread-us-democrats-win-its-households-are-praying-it">Reuters</a> tied the $10 billion request directly to that role. Analyst Imran Khan, formerly of the US Institute of Peace, told <a href="https://aljazeera.com/news/2026/10/27/could-us-midterms-reshape-pakistans-relationship-with-washington">Al Jazeera</a> that a weaker Trump could mark the start of the end of Pakistan’s current importance. Once the war ends, Washington needs Islamabad less.</p><p>• <strong>The lame-duck window.</strong> Until January 3, Republicans still hold Congress. Barbara Slavin of the Stimson Center told <a href="https://www.aljazeera.com/news/2026/11/4/iranian-leaders-welcome-us-midterms-but-trump-may-still-attack">Al Jazeera</a> that Trump “still retains enormous powers as commander-in-chief, especially before the new Congress is seated,” and the escalation scenario in my dashboard flags the risk that the administration uses this period before the new majorities can act.</p><p>• <strong>A contested deal carries Pakistan’s name.</strong> Iranian state TV claimed, according to <a href="https://www.iranintl.com/en/202611118522">Iran International</a>, that Munir raised the idea of letting Iran enrich uranium at 3.67%, a claim the US has not confirmed. If a final deal includes enrichment, hawks in both parties may attack it, and Pakistan’s role would be part of that debate.</p><p>• <strong>The market has already priced in peace.</strong> With the KSE-100 near 179,000, a collapse in talks would hit sentiment harder than if expectations were lower.</p><ul><li><strong>Partial reopening is not full reopening.</strong> Iran says it monitors and controls the eastern part of the strait and asks ship-owners to coordinate passage with its forces (<a href="https://www.iranintl.com/en/202611118522">Iran International</a>). Insurance and freight costs may stay high even under a deal.</li></ul><h3>The case that nothing changes</h3><p>The strongest single forecast is that very little changes for Pakistan before 2028, because the levers that matter most stay with the president. The argument rests on four observations.</p><p>Firstly, the channel Pakistan uses runs through the White House, and it stays open for two more years. Even the Republican side of Congress has endorsed it: in July 2026, Representatives Ryan Zinke and Michael Baumgartner met Munir in Rawalpindi, and <a href="https://telanganatoday.com/two-us-lawmakers-hold-talks-with-pakistans-army-chief-in-rawalpindi">Zinke said</a> “the relationship has never been better.”</p><p>Secondly, every spending bill still needs Trump’s signature, and an override needs Republican votes. Democrats can delay and condition, but they cannot simply restore programs on their own terms.</p><p>Thirdly, Pakistan’s strategic value does not depend on either party. Kamran Yousaf argues in <a href="https://tribune.com.pk/story/2639321/pak-us-ties-after-the-midterm-jolt">The Express Tribune</a> that its geography, nuclear status and proximity to Iran and Afghanistan remain, and Michael Kugelman of the Atlantic Council told <a href="https://www.al-monitor.com/originals/2026/11/analysis-pakistans-leaders-dread-us-democrats-win-its-households-are-praying-it">Reuters</a> that Pakistan’s counterterrorism cooperation and Iran diplomacy have bipartisan support. Kugelman also expects Democrats to blame problematic deals on Trump rather than on Pakistan.</p><p>Fourthly, the gains from Trump’s embrace were thin to begin with. Yousaf notes that the improvement “has not necessarily translated into major tangible economic or strategic gains,” and analyst Imran Khan told Al Jazeera that Pakistan gained mainly intangibles. There is less to lose than the headlines suggest.</p><p><strong>The case that aid will remain out of grasp.</strong> On bilateral development aid specifically, the status quo is even more likely to hold. Given that USAID is currently dismantled, the administration’s FY2027 request cuts deeper still, and the same Democrats who want more foreign aid are the ones writing letters about political prisoners in Pakistan. Former ambassador Husain Haqqani told <a href="https://www.al-monitor.com/originals/2026/11/analysis-pakistans-leaders-dread-us-democrats-win-its-households-are-praying-it">Reuters</a> that Pakistan built a transactional relationship with Trump’s team and appears unprepared for scrutiny. In my judgment, the chance that bilateral US development aid to Pakistan remains largely suspended through 2027 is above two in three.</p><h3>Three scenarios for the next 12 months</h3><p>My central case is a status quo with more scrutiny, followed by a constrained de-escalation that would bring Pakistan real but modest relief. The weights below are my own judgment, built from the evidence above, not the output of any model. Analysts and readers are welcome to assign their own weights based on their own evaluation, and even build on this, given it’s a rather rudimentary way to measure chances of different outcomes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*P_j5JXI0e-7rmtvoAx_zow.png" /><figcaption>Scenarios and their likelihood by weight</figcaption></figure><p>Two points follow from this table. First, aid is the least important variable in every scenario, because the oil channel dwarfs it. Second, the scenario that is best for Pakistan’s households (B) is not the one that is best for its leadership’s standing in Washington, since peace reduces the need for a mediator.</p><h3>Conclusion</h3><p>In conclusion, the midterms matter to Pakistan’s economy mainly through oil and the Iran war, much less through aid, and least of all through any quick change in Washington’s view of Pakistan. A Democratic Congress can make escalation costlier and fund more foreign aid, but the president keeps the veto, the tariffs, the Treasury and the back channel until 2029. The aid that may return is likely to be civilian and conditional, and it is small next to a single month of remittances.</p><p>For Islamabad, the practical lesson is the one Pakistani commentators reached within days. Dawn’s editorial board urged ties that can withstand changes in Washington rather than personal rapport with whoever holds the White House, and Yousaf wrote that “Pakistan cannot afford to depend on one American president or one political party.” Former UN ambassador Munir Akram, quoted in <a href="https://www.nation.com.pk/06-Nov-2026/us-midterm-fallout-islamabad-must-immediately-engage-democrats">The Nation</a>, advised immediate outreach to the Democratic leadership, without trading away the China partnership. For Pakistan’s private sector, the lesson is simpler: watch Brent and the Strait of Hormuz, not Capitol Hill.</p><p><em>This article reflects reporting available as of November 16, 2026. Seat counts are the Associated Press count as of that date, and the scenario weights are the author’s judgment, not forecasts.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=97fcd5d5d40f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Closure of Strait of Hormuz spells Doom for Pakistan]]></title>
            <link>https://medium.com/@umairzia71/how-prolongued-closure-of-strait-of-hormuz-spells-doom-for-pakistan-c6949c22642f?source=rss-cd81104f6d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/c6949c22642f</guid>
            <category><![CDATA[pakistan-economy]]></category>
            <category><![CDATA[strait-of-hormuz]]></category>
            <category><![CDATA[iran]]></category>
            <category><![CDATA[pakistan]]></category>
            <category><![CDATA[economics]]></category>
            <dc:creator><![CDATA[Umair Zia]]></dc:creator>
            <pubDate>Sat, 14 Mar 2026 22:42:06 GMT</pubDate>
            <atom:updated>2026-03-14T23:11:03.171Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/892/1*XBtofU-HZPBo4yHNZ2WfTw.png" /><figcaption>Flowchart showing directional effects of various economic impacts on respective sectors</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*U3EZtxQVTiu_kJTgg-7T6Q.png" /><figcaption>Key Guide to help interpret the above flowchart</figcaption></figure><p>On February 28, 2026, U.S.-Israeli airstrikes on Iran set off a chain of events that effectively sealed one of the most important 21-mile stretches of water on Earth. Within days, <a href="https://www.seatrade-maritime.com/tankers/the-strait-of-hormuz-crisis-and-its-devastating-impact-on-asia-gulf-trade">over 150 tankers </a>had anchored outside the Strait of Hormuz rather than risk transit. Maersk, Hapag-Lloyd, and MSC suspended sailings. Not just that but s<a href="https://www.globaltrademag.com/hormuz-closure-sends-container-shipping-diversions-surging-360/">hipping diversions surged 360%</a>. To add insult to injury, o<a href="https://www.seatrade-maritime.com/tankers/the-strait-of-hormuz-crisis-and-its-devastating-impact-on-asia-gulf-trade">il prices jumped 10–13%</a> in the first week alone.</p><p>For most of the world, this is a serious disruption no doubt. But for Pakistan, it is something closer to an existential economic crisis — one unfolding in slow motion across four interconnected pressure points: energy, fertilizer, labor, and technology. Lets go by it sector by sector :</p><p><strong>Energy: A Country Without a Cushion</strong></p><p>Pakistan’s structural position going into this crisis was already precarious. The country <a href="https://www.nation.com.pk/13-Mar-2026/closure-strait-hormuz-may-raise-pakistan-s-monthly-oil-import-bill-dollar-3-5-dollar-4-5b-pide">imports 80–85% of its petroleum requirements</a>, with the vast majority of those shipments historically routed through the Strait of Hormuz before reaching Karachi and Port Qasim. Its strategic petroleum reserves <a href="https://www.nation.com.pk/13-Mar-2026/closure-strait-hormuz-may-raise-pakistan-s-monthly-oil-import-bill-dollar-3-5-dollar-4-5b-pide">cover roughly 10 to 14 days</a> of normal consumption. This is in sharp contrast to India’s significantly larger buffer, something that should trigger concern in those concerned with national security.</p><p>Then there is LNG. Pakistan has been importing liquefied natural gas since 2015 as <a href="https://pide.org.pk/research/gas-crisis-in-pakistan/">domestic gas reserves have declined</a>, and LNG now powers nearly a quarter of the country’s electricity. The problem is where that gas comes from: Qatar and the UAE together<a href="https://www.cnbc.com/2026/03/03/strait-of-hormuz-closure-which-countries-will-be-hit-the-most.html"> account for 99%</a> of Pakistan’s LNG imports. Both countries’ export infrastructure now sits inside a closed maritime corridor, with QatarEnergy having halted production entirely and declared force majeure on its contracts.</p><blockquote><em>“Pakistan and Bangladesh have limited storage and procurement flexibility, meaning disruption would likely trigger fast power-sector demand destruction rather than aggressive spot bidding.”</em> — Go Katayama, Principal Insight Analyst, Kpler</blockquote><p>That phrase “demand destruction” is a clinical way of saying rolling blackouts. Not just higher electricity bills but actual loss of power to homes, shops, hospitals, and factories.</p><p>Every <a href="https://www.nation.com.pk/13-Mar-2026/closure-strait-hormuz-may-raise-pakistan-s-monthly-oil-import-bill-dollar-3-5-dollar-4-5b-pide">$10 increase in global oil prices raises Pakistan’s annual petroleum import bill by approximately $1.8–2.0 billion</a>. In the worst-case scenario, analysts at PIDE (Pakistan Institute of Development Economics) have warned that a 3 month disruption could push oil to $120–$150 per barrel could <a href="https://www.nation.com.pk/13-Mar-2026/closure-strait-hormuz-may-raise-pakistan-s-monthly-oil-import-bill-dollar-3-5-dollar-4-5b-pide">raise Pakistan’s monthly oil import bill to between $3.5 and $4.5 billion</a>; this would consume the country’s foreign exchange reserves at catastrophic speed.</p><p>The government’s response has included: a four-day workweek for government employees, two-week school closures, a ban on in-person government meetings, caps on wedding guest lists, and — most jarring — the largest fuel price increase in the country’s history. <a href="https://www.aljazeera.com/news/2026/3/10/pakistan-orders-sweeping-austerity-measures-as-iran-war-triggers-oil-crisis">Petrol jumped 20% in a single week.</a></p><p>Pakistan is also attempting to reroute crude purchases. A Pakistan National Shipping Corporation vessel has reached Saudi Arabia’s Red Sea port of Yanbu and is heading to Karachi with<a href="https://www.thenews.pk/story/1403935-pakistan-starts-crude-oil-imports-via-red-sea-after-strait-of-hormuz-blockade"> 73,000 tonnes of crude</a>. It is a creative workaround, but an expensive and uncertain one — especially since the Red Sea route now faces increased risk of Houthi attacks (in solidarity with Iran), and routing entirely around Africa’s Cape of Good Hope adds weeks and millions of dollars per voyage.</p><p><strong>Fertilizer: The Hidden Crisis Inside the Crisis</strong></p><p>Roughly <a href="https://carnegieendowment.org/emissary/2026/03/fertilizer-iran-hormuz-food-crisis">one-third</a> of global seaborne fertilizer trade passes through the Strait of Hormuz. The Gulf is not only one of the world’s primary production regions for fertilizers, but also facilitates a good chunk of trade for it as well. Cheap natural gas from Qatar and Saudi Arabia provides the feedstock for nitrogen fertilizers like urea and ammonia. When the gas stops flowing, so does fertilizer production. This is dire for Pakistan as many powerplants in the country heavily rely on Qatari LNG to meet their operational needs.</p><p>Pakistan’s domestic fertilizer producers have been <a href="https://carnegieendowment.org/emissary/2026/03/fertilizer-iran-hormuz-food-crisis">forced to curtail output</a>. At the same time, imported urea prices have already <a href="https://www.thenationalnews.com/business/economy/2026/03/12/global-fertiliser-supply-at-risk-amid-strait-of-hormuz-blockade/">risen roughly 25%</a> since the conflict began, reaching around $591 per tonne globally. That figure is climbing, and it is yet to be seen if Pakistan can rely on other major trading partners to address the shortfall.</p><p>The timing also presents challenges, the closure happened during Pakistan’s pre-Kharif planting window i.e. the months when farmers lock in fertilizer purchases for the summer crop cycle, which produces the bulk of the country’s wheat, rice, cotton, and sugarcane. If farmers reduce fertilizer use now, its reasonable to expect yields fall in six months. And lower yields mean higher domestic food prices, reduced rice and agricultural exports (two of Pakistan’s primary foreign exchange earners). It also deepens food insecurity in a country where already suffering food hyper-inflation.</p><blockquote><em>“Oil powers cars. Nitrogen powers crops. If the Strait of Hormuz closes, the most consequential price may not be Brent crude but the cost of feeding the world.”</em> — The Conversation / UN University</blockquote><p><strong>Labor: The Remittance Lifeline Under Threat</strong></p><p>Pakistan’s economy has often been described as running on three main engines: exports, foreign borrowing, and remittances. Of the three, remittances from the Gulf are both the most substantial and the most vulnerable right now.</p><p>Approximately <a href="https://www.aljazeera.com/news/2026/3/13/how-israel-us-war-on-iran-puts-50bn-in-indian-remittances-at-risk">4.9 million</a> Pakistanis work in GCC countries; they are the second-largest expatriate community in the Gulf after India. In February 2026 alone, Pakistan received <a href="https://www.arabnews.com/node/2636017/pakistan">$3.3 billion in foreign remittances</a>, with the UAE and Saudi Arabia contributing the top two shares at $696 million and $685 million respectively. The full-year projection stood at <a href="https://sputnikglobe.com/20260313/oil-at-120-what-economic-risks-does-pakistan-face-from-iran-war-1123821242.html">$38 billion</a> — a lifeline that has kept Pakistan’s current account and foreign reserves from collapsing during repeated economic crises.</p><p>Now this lifeline is under threat</p><p>Iranian strikes have targeted energy facilities, airports, and commercial infrastructure across parts of the Gulf, including areas near Dubai’s Jebel Ali port. Even Dubai International Airport (most busy airport in the world) has been forced to temporarily suspended operations. Hotels, construction projects, and retail businesses across the UAE and Qatar have also experienced disruptions. These sectors happen to employ large numbers of Pakistani blue-collar workers, particularly in construction, hospitality, and logistics.</p><p>If remittance flows were to fall by even 30–40%, Pakistan could face a monthly gap of <a href="https://timesofislamabad.com/03-03-2026/pakistan-risks-3-billion-monthly-loss-if-iran-israel-war-continues-report/">roughly $500–700 million.</a> In a more catastrophic scenario, wherein the Gulf economies face broader economic disruption, the shortfall could move closer to $1.5 billion per month. Combining falling remittance inflows along with increased reliance on imports, the pressure on foreign exchange reserves could escalate quickly, potentially forcing emergency discussions with the IMF.</p><p>There is also a human dimension that economic analysis tends to paper over. Millions of families in Lahore, Karachi, Multan, and smaller cities depend directly on monthly transfers from fathers, sons, and brothers working in Riyadh, Dubai, and Doha. For those families, the Gulf crisis isn’t just another geopolitical development — it determines whether school fees get paid, rent is covered, and basic household expenses can be met in the coming months.</p><p><strong>Technology: Another growing sector faces a casualty</strong></p><p>The technology impact on Pakistan is less dramatic than the others, but it is real and compounding.</p><p>Pakistan’s IT sector has been one of the country’s genuine recent success stories: it contributes via growing exports, establishing a large freelancer base (already under threat of unemployment thanks to AI), and increasing foreign exchange contributions. It is also a sector with specific dependencies on the Gulf supply chain that are now strained.</p><p>Most IT hardware entering Pakistan e.g. servers, networking equipment, consumer electronics, transits through Dubai’s Jebel Ali port, the Middle East’s largest container hub. With Jebel Ali partially disrupted by Iranian strikes and now congested with diverted cargo that cannot reach Gulf-side ports, inbound hardware shipments face delays, surcharges of $2,500–$3,500 per container, and deep uncertainty about routing timelines. One could argue that Pakistan’s technology importers are navigating the most disrupted logistics environment since the COVID-19 pandemic.</p><p>More acutely, Pakistan’s IT sector depends on reliable power. Remote workers, software houses, data centers, and the freelancers contributing to foreign exchange earnings all need stable electricity, which always has been a consistent problem and now at further risk from the LNG shortfall. Prolonged rolling blackouts would hit Pakistan’s tech export capacity directly and sharply.</p><p>There is also a cloud infrastructure dimension. Pakistani businesses and developers rely heavily on Microsoft Azure and AWS nodes hosted in the UAE and Qatar as their nearest low-latency cloud infrastructure. Both providers have reported latency issues and service disruptions at Middle Eastern nodes following strikes on Gulf facilities. For a sector that runs on connectivity and uptime, even degraded digital infrastructure is a meaningful operational setback.</p><h3>Conclusion : The Compound Effect</h3><p>What makes Pakistan’s position uniquely fragile is not any single one of these channels in isolation — it is how they reinforce each other.</p><p>Energy shortfalls raise production costs and cause power cuts. Power cuts hit industrial output and the IT sector. Fertilizer shortages reduce agricultural yields and increase food prices. Higher food prices increase domestic inflation, eroding purchasing power and social stability. Falling remittances reduce the foreign exchange available to pay for energy imports. A weaker rupee makes energy and technology imports more expensive in local currency terms, thus worsening the trade deficit even more.</p><p>Analysts at Pakistan Institute of Development Economics have modeled a three-month maximum-intensity disruption scenario and arrived at cumulative <a href="https://timesofislamabad.com/03-03-2026/pakistan-risks-3-billion-monthly-loss-if-iran-israel-war-continues-report/">losses approaching $9 billion</a>. This is much more devastating than the balance-of-payments crises in the past that have repeatedly forced Pakistan to the IMF for emergency support.</p><p>Pakistan entered this crisis with 10–14 days of petroleum reserves, near-zero fertilizer stockpiles, an almost total LNG dependence on the now-disrupted Qatari corridor, and a remittance base centered in the conflict zone. The government’s emergency austerity measures — fuel price hikes, government shutdowns, school closures, navy escorts for merchant vessels — are buying time. They are not resolving the structural vulnerability.</p><p>The Pakistan Navy has launched escort operations for merchant vessels carrying essential cargo. The government has formed a high-level cabinet committee meeting daily to monitor petroleum stocks, foreign exchange exposure, and supply chain disruptions. These are the actions of a government managing a crisis in real time, not a government in control of one.</p><p><em>This article is based on current reporting as of mid-March 2026. The Strait of Hormuz crisis remains active and conditions are changing rapidly.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c6949c22642f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Iterative problem solving — never start with boiler-plate GPT code]]></title>
            <link>https://medium.com/@umairzia71/iterative-problem-solving-never-start-with-boiler-plate-gpt-code-33f6e43d7d8e?source=rss-cd81104f6d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/33f6e43d7d8e</guid>
            <category><![CDATA[gpt-4]]></category>
            <category><![CDATA[ai-lessons]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[self-learning]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Umair Zia]]></dc:creator>
            <pubDate>Sun, 20 Apr 2025 21:48:49 GMT</pubDate>
            <atom:updated>2025-04-20T21:48:49.339Z</atom:updated>
            <content:encoded><![CDATA[<h3>Iterative problem solving — never start with boiler-plate GPT code</h3><p>I was practicing some SQL problems in my recent learnsql online course and ran into a bit of a tricky problem, but managed to find a solution. Its one of those typical coding problems where the interpretation of the question statement can determine if the code is correct or not. I decided to see if GPT-4 could arrive at the same solution and noticed, to my shock, it got the problem wrong several times — even after each attempt, I gave the LLM more and more hints on how to read the problem correctly.</p><p>Given the reputation of OpenAI’s new and improved GPT-4, I thought these kinds of more entry-level problems would be easily addressed to aid self-dictated learners, but to my shock it looks like code-hallucination is still possible even when dealing with relatively simple problems using non-complex datasets.</p><p>So if you’re a professional looking to sharpen up your skills or a student looking to get more experience with a new language, it may be a good idea to attempt a solution yourself many times, before asking GPT to take you into a self-referential failed loop of incorrect code.</p><h3>The Challenge</h3><p>Take a look at the Schema of our two tables: Apartments and Couples</p><pre>Apartments:<br>| id | location      | price  | rating |<br>|----|---------------|--------|--------|<br>| 1  | Chicago       | 300000 | 3      |<br>| 2  | Charleston    | 400000 | 4      |<br>| 3  | Chicago       | 200000 | 3      |<br>| 4  | Las Vegas     | 250000 | 3      |<br>| 5  | Las Vegas     | 150000 | 4      |<br>| 6  | Seattle       | 100000 | 4      |<br>| 7  | Seattle       | 140000 | 3      |<br>| 8  | San Francisco | 260000 | 3      |<br>| 9  | San Francisco | 280000 | 4      |<br><br>Couples:<br>| id | couple_name       | min_price | max_price | pref_location |<br>|----|-------------------|-----------|-----------|---------------|<br>| 1  | Mark and Jess     | 120000    | 180000    | Charleston    |<br>| 2  | Jenny and Pawel   | 130000    | 220000    | Chicago       |<br>| 3  | Peter and Jenny   | 210000    | 500000    | Las Vegas     |<br>| 4  | Jessica and Pawel | 220000    | 280000    | Las Vegas     |<br>| 5  | John and Maria    | 110000    | 190000    | Seattle       |<br>| 6  | Maria and Sam     | 150000    | 210000    | Seattle       |<br>| 7  | Samantha and Theo | 220000    | 250000    | San Francisco |<br>| 8  | Mark and Jenny    | 110000    | 120000    | San Francisco |<br>| 9  | August and Marta  | 150000    | 170000    | Chicago       |<br>| 10 | Isabelle and Mathew | 270000  | 360000    | Chicago       |<br>| 11 | Jacob and Alice   | 280000    | 350000    | San Francisco |<br>| 12 | Alice and John    | 290000    | 640000    | San Francisco |</pre><p>The task is easy enough but the wording is a bit tricky: Show the name of each couple, their preferred apartment location, and the apartment ID for all apartments that are <strong>neither in their price range nor in their preferred location.</strong></p><p>In this case, the price range refers specifically to the min_price and max_price in the Couples table. It seems obvious enough but there are two ways to interpret this</p><ol><li>Get the apartments whose prices falls <strong>outside </strong>the range i.e. price &lt; min_price OR price &gt; max_price</li><li>Get the apartments <strong>NOT within</strong> the range specified : NOT BETWEEN min_price and max_price</li></ol><p>In SQL, the 2nd approach works because it encapsulates both conditions under a single logical operator, which streamlines the query and ensures that only those entries that definitively fall outside the specified price range are selected. This distinction is crucial, as it avoids the potential pitfalls that can occur when separately handling conditions for under and over the specified range — a common source of error in conditional logic.</p><h3>AI Misinterpretation</h3><p>Despite clear instructions and iterative guidance, the GPT-4o mini consistently misinterpreted the core requirements of the query. Initially, the model provided solutions that inaccurately applied the conditional logic:</p><pre>-- 1st soltution<br>SELECT <br>    couples.couple_name, <br>    couples.pref_location, <br>    apartments.id AS apartment_id<br>FROM couples<br>JOIN apartments <br>  ON apartments.location != couples.pref_location <br>  AND (apartments.price &lt; couples.min_price OR apartments.price &gt; couples.max_price);</pre><pre>-- 2nd soltution <br>SELECT <br>    couples.couple_name, <br>    couples.pref_location, <br>    apartments.id AS apartment_id<br>FROM couples<br>JOIN apartments <br>  ON apartments.location != couples.pref_location <br>WHERE apartments.price BETWEEN couples.min_price AND couples.max_price;</pre><p>Each solution proposed by the AI missed the mark, focusing either on the wrong aspects of the price condition or misaligning the logic for location filtering. Upon reflection, the repeated errors stemmed from a fundamental misunderstanding of the SQL “NOT BETWEEN” condition as it pertains to both the price and location criteria. Despite its advanced algorithms and processing capabilities, GPT-4 defaulted to a more straightforward interpretation that failed to capture the nuanced exclusion criteria specified in the task.</p><h3>The Correct Approach</h3><p>The correct solution required a precise application of SQL logic:</p><pre>SELECT couples.couple_name, couples.pref_location, apartments.id<br>FROM couples JOIN apartments <br>  ON apartments.location != couples.pref_location<br>WHERE apartments.price NOT BETWEEN couples.min_price AND couples.max_price;</pre><p>This query accurately filters out entries based on both location and price range exclusions, aligning perfectly with the task requirements.</p><h3>Lessons Learned</h3><p>This experience has reinforced several key lessons about working with AI:</p><ol><li><strong>AI Limitations</strong>: No matter how advanced, AI can still misinterpret complex instructions or nuanced tasks that require a deep understanding of context or ambiguity.</li><li><strong>Human Oversight</strong>: Continuous human oversight is crucial, especially when verifying AI-generated solutions in technical or nuanced fields like SQL query construction.</li><li><strong>Understanding the Problem</strong>: A deep and thorough understanding of the problem at hand is essential before one can effectively utilize AI to find a solution. This ensures that any misinterpretations can be quickly identified and corrected.</li></ol><h3>Conclusion</h3><p>While AI offers tremendous benefits in automating and solving complex problems, this interaction serves as a reminder that it is not infallible. As we integrate AI tools into our workflows, we must remain actively involved in the process, leveraging our unique human insights to guide and refine the solutions provided by AI.</p><p>This balance of AI capabilities with human expertise not only ensures more accurate outcomes but also enhances our own understanding and skills in the process.</p><p><strong>#AILessons #DataScience #SQL #CriticalThinking #TechnologyInnovation</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=33f6e43d7d8e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Grok 3 Banana Peel Experiment: A Tale of AI, Fruits, and Stubborn Scissors]]></title>
            <link>https://medium.com/@umairzia71/the-grok-3-banana-peel-experiment-a-tale-of-ai-fruits-and-stubborn-scissors-e1664fdfa551?source=rss-cd81104f6d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/e1664fdfa551</guid>
            <category><![CDATA[grok-3]]></category>
            <category><![CDATA[grok]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[ai-image-generation]]></category>
            <category><![CDATA[generative-ai]]></category>
            <dc:creator><![CDATA[Umair Zia]]></dc:creator>
            <pubDate>Wed, 26 Mar 2025 18:22:34 GMT</pubDate>
            <atom:updated>2025-03-26T18:22:34.843Z</atom:updated>
            <content:encoded><![CDATA[<p>An exercise in simple image generation gone wrong — or did it ? I didn’t get the image I hoped for, but I did learn something about AI models.</p><p>So, I decided to have some fun with Grok 3, the latest AI from xAI, and test its image generation skills. What started as a simple request spiraled into a hilarious, frustrating, and oddly educational journey. My goal? Get Grok to generate an image of “scissors cutting a banana peel to reveal nothing inside the banana peel.” Sounds straightforward, right? Spoiler: it wasn’t. Here’s the saga of prompts, failures, and what it taught me about the quirks of generative AI.</p><p>Round 1: The Non-Empty Box Fiasco</p><p>Before we even got to the banana peel, I warmed up Grok with a different challenge: “Generate an image of a non-empty box with no cats inside.” Easy enough, I thought. But the first images Grok spat out? Empty boxes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xXQByCnaXT2HXEizE2oGLg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1P4NUGu6nH_R-2GtXaB-Vw.jpeg" /></figure><p>I pointed out the contradiction — non-empty means something should be in there — and Grok apologized, admitting it didn’t specify contents like toys or books. Fair enough, rookie mistake. So I refined to add more clarity:</p><p>“Generate an image of an non-empty box with no cats inside, showing the POV of the inside of the box, and box is decorated with cat paws.”</p><p>And here are the results</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XaYBGvPCKT8zdynAzteqvw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ddjjZ_5kgnheR1vl_KBZNQ.jpeg" /><figcaption>I like the design, but again the boxes seem empty, except maybe the first box which seems to have an even smaller box inside — its a strange touch but looks like Grok did indeed get it right the first time, but the 2nd box is clearly empty</figcaption></figure><p>This time, the box was still empty in the 2nd image, fair enough, that’s still 1/2 or 50%. Grok explained that the prompt might’ve been too vague for the image model to infer contents. Strike one for AI creativity — or lack thereof.</p><p>Round 2: The Watermelon Glass Mix-Up</p><p>Next, I pivoted: “Now generate an image of a non-empty drinking glass cup that has the colors of a watermelon.” I pictured a vibrant green-and-red glass filled with juice or something — anything, as long as it was nto empty. Grok’s response? A glass with watermelon colors… and cat paws decorating it. Wait, what? I didn’t asked for paws!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*42HRaaAVrPUUfos_CT4qow.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*h74Wt9eCvRraunXImTtvWg.jpeg" /><figcaption>For the most part it seems Grok was headed in the right direction, but the first image is just a regular glass decorated with red stripes and cat paws, with watermelon juice inside. The second image is roughly the same, only this time no stripes, paws, and watermelon pic on the glass.</figcaption></figure><p>Grok sheepishly admitted it carried over that detail from the box prompt. This shows at least Grok is keeping our previous conversations in memory. The glass was non-empty this time, filled with a beverage, so points for that — but those uninvited paws? It showed me AI can get stuck on prior context, even when you’ve moved on. Which is why next time I might generate a separate chat for each image generation process.</p><p>Round 3: The Banana Peel Begins</p><p>Now, onto the main event: “Generate a simple image of a scissor cutting a banana peel to reveal nothing inside the banana peel.” I was clear — nothing inside.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NqbDLkCNho9r6pKZqTnGpA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-mNZsO20CYoT-JSpqfC4sg.jpeg" /></figure><p>Now lets get to it : The first Image one; a broken pair of scissors hovering near a banana peel, with no clear indication it was empty inside. Image two: a banana inside the peel, blatantly ignoring my “nothing” request.</p><p>I clarified the mistake to Grok and in clear terms and gave it a second chance, but the results actually got worse :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fGi-8CfQwp9hqp1OEEFdfw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Jbh9gxxVGIICiC450u7jog.jpeg" /></figure><p>The new images? Bananas still inside the peel, and the scissors looked… awkward, to say the least. One pair was bent at an unnatural angle, like it was mid-meltdown. I laughed and told Grok, “The banana’s still there, and the scissors look awkward as heck.” Grok tried again, promising to fix it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lRqkv4btcG9YUUEVRSgl1w.jpeg" /></figure><p>Strike four — and I was starting to see a pattern. I decided to give up at this stage and do a retrospective on this.</p><p>What Went Wrong? A Peek Under AI’s Hood</p><p>So, why did Grok keep failing? Let’s break it down. Gen AI image models — like the one powering Grok — are trained on massive datasets of real-world images. They’re great at pattern recognition and replication: show them a banana peel, and they’ve seen thousands with bananas inside. The concept of “nothing” is trickier. AI doesn’t “think” abstractly like we do — it generates based on what it knows i.e. its training data. Its unlikely that the training data for recognizing bananas would contain tons of empty banana peels. Clearly Grok had trouble distinguishing between the form of a banana peel (the outer layer) and the banana itself (the inside object).</p><p>So I asked Grok itself to explain why it got it wrong. Here’s the gist of the reply:</p><p>‘<em>The phrase “banana peel” might implicitly cue the model to include the fruit — linguistic association is powerful in AI. Even when you emphasized “nothing inside,” the model seemed to default to its comfort zone: a banana-filled peel. The awkward scissors? That’s likely the model overcompensating — focusing on “intact” and “natural” but fumbling the execution under conflicting constraints.</em>’</p><p>Take the box prompt: “non-empty” was too vague, so it defaulted to empty. The watermelon glass? Context bleed from the prior prompt added paws. The banana peel? A stubborn refusal to let go of the fruit. Each failure highlights a key limit: AI lacks true understanding. It’s a mimic, not a mind.</p><p>This exercise wasn’t just about bananas (or lack thereof). It’s a microcosm of generative AI’s strengths and weaknesses. These models excel at photorealism and common scenarios — think “sunset over a lake” or “dog in a park.” But abstract or negative concepts — like “nothing inside” — trip them up. They’re not reasoning; they’re predicting pixels based on patterns. My banana peel saga shows how AI can misfire when you push beyond the norm.</p><p>Why It Matters</p><p>Generative AI is everywhere — art, ads, social media, — and it’s easy to assume it’s flawless. But it’s not. It’s a tool with blind spots, and knowing them helps us use it better. Next time you see an AI-generated image, ask: what’s it not showing? What assumptions did it bake in? You might just peel back the layers (pun intended) of what these models can — and can’t — do.</p><p>Thanks for reading</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e1664fdfa551" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Visualizing Flavanols and Heavy Metal content in specific Dark Chocolate brands]]></title>
            <link>https://medium.com/@umairzia71/visualizing-flavanols-and-heavy-metal-content-in-specific-dark-chocolate-brands-4594270dbc0d?source=rss-cd81104f6d4------2</link>
            <guid isPermaLink="false">https://medium.com/p/4594270dbc0d</guid>
            <category><![CDATA[fitness]]></category>
            <category><![CDATA[chocolate]]></category>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[health]]></category>
            <category><![CDATA[data-visualization]]></category>
            <dc:creator><![CDATA[Umair Zia]]></dc:creator>
            <pubDate>Sat, 22 Mar 2025 19:51:26 GMT</pubDate>
            <atom:updated>2025-03-22T20:06:51.212Z</atom:updated>
            <content:encoded><![CDATA[<p>A visual yardstick for figuring out which brands might be better than others</p><p>I watched an interesting <a href="https://www.youtube.com/watch?v=RzWWOQMLttE">YouTube video</a> assessing the health benefits of various dark chocolate brands and ranking them, specifically those that claim to be more than 50% cocoa content — hence making them “healthier” than regular milk chocolate which typically has more sugar, more milk and less pure cocoa. The final ranking looks like this :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/1*zRGBJptCyZqXAgy5PGp02w.png" /><figcaption>Brand rankings based on Flavanols and Heavy metals — Bryan Johnson</figcaption></figure><p>But the video stops here with the visuals and doesn’t bother giving you any other aids to better assess each brand — so for the sake of my own fitness goals (and maybe yours) I wanted to summarize the data the video presented in a more intuitive and easy-to-memorize way :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/884/1*6bNyZz8UPWzUIA1DnEjHxQ.png" /><figcaption>Calories per 100g by Brand</figcaption></figure><ol><li>The first chart explores calorie content across different chocolate brands. Most brands cluster around 580–592 calories per 100g, which is typical for dark chocolate. Ritter Sport and Tony’s Chocolonely have slightly lower calorie counts (~505 kcal/100g) compared to others. Overall it shows there’s not much difference in caloric intake for diet-conscious people.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/737/1*AyLFmJUVBuk2F_ijNHtdsg.png" /><figcaption>Flavanols vs. Heavy Metals — per Brand</figcaption></figure><p>2. The second chart illustrates the correlation between Flavanol level and heavy metal content. There seems to be no strong correlation between flavanol content and heavy metal levels. There’s also a lot of variance between brands: Some brands with similar flavanol levels (e.g., ~160–180 mg) have vastly different heavy metal concentrations. A few brands (e.g., Alter Eco) have significantly higher heavy metal content (&gt;10 µg), despite having flavanol levels similar to brands with lower heavy metal content.</p><p>3. The Scoring system — the scoring for each brand seems independent of the caloric intake, which makes sense because as we established earlier — there’s not much different in calories per chocolate bar. So what is it that’s impacting the score ? Let’s check out the correlation heatmap between Flavanols, Heavy Metals and Score :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/506/1*-RQup_Hk0nV_zXuFWPpgNg.png" /><figcaption>Heatmap for Score Vs Flavanols (mg) Vs Heavy metals (μg)</figcaption></figure><p>The key takeaway regarding the scoring seems to be as follows :</p><ul><li>The higher the heavy metal content, the bigger penalty on the score. The strong negative correlation seems to indicate regardless of brand, more heavy metals do a lot to lower your score</li><li>Higher Flavanol level is weakly positively correlated with the score. Which means adding more flavanols doesn’t necessarily mean a higher score, unless you are controlling or minimizing the additional heavy metal content in the chocolate.</li></ul><p>The above makes sense because Tony’s brand has the highest Flavanol level (217.5 mg), yet has a measly score of 37, this is because of its heavy metal content (5.91 μg), which probably outwieghs any health benefits of the Chocolate. Meanwhile Lindt has ~24% less Flavanols (174.9 mg) but also very slightly less heavy metals (4.5 μg), but makes away with a better score of 39.</p><p>Overall it seems Bryan Johnson’s scoring system seems to emphasize the idea that t<strong>he flavanol-to-heavy metal ratio might be more important than flavanol alone</strong> → If a chocolate boosts flavanols but also increases heavy metals, the net effect on the score could still be negative. So pick carefully when shopping for your next brand !</p><p>Thanks for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4594270dbc0d" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>