<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Wajdy Mustafa</title>
    <description>The latest articles on DEV Community by Wajdy Mustafa (@wajdy_mustafa_f2d71f0be44).</description>
    <link>https://dev.to/wajdy_mustafa_f2d71f0be44</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4100793%2F7230fa4e-9dce-45bd-8822-fc3be6e8ba75.png</url>
      <title>DEV Community: Wajdy Mustafa</title>
      <link>https://dev.to/wajdy_mustafa_f2d71f0be44</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/wajdy_mustafa_f2d71f0be44"/>
    <language>en</language>
    <item>
      <title>I tested my own Chrome extension with Playwright and found 3 bugs, including one that silently killed the entire UI.</title>
      <dc:creator>Wajdy Mustafa</dc:creator>
      <pubDate>Thu, 03 Sep 2026 16:54:19 +0000</pubDate>
      <link>https://dev.to/wajdy_mustafa_f2d71f0be44/i-tested-my-own-chrome-extension-with-playwright-and-found-3-bugs-including-one-that-silently-55be</link>
      <guid>https://dev.to/wajdy_mustafa_f2d71f0be44/i-tested-my-own-chrome-extension-with-playwright-and-found-3-bugs-including-one-that-silently-55be</guid>
      <description>&lt;p&gt;I built a Chrome extension that replaces the new tab page with a daily sudoku puzzle. The generator and verifier were solid -- I'd already independently confirmed every puzzle has exactly one solution. What I hadn't done yet was actually test the extension itself. That gap mattered.&lt;/p&gt;

&lt;h2&gt;
  
  
  Actually launching a browser beats reading the code again
&lt;/h2&gt;

&lt;p&gt;I used Playwright to load the extension's new-tab page for real, in a real Chromium instance, and drove it the way a person would: click a cell, type a number, click Reveal, click Check. First run: blank page. No board, no numbers, nothing. Reading the code wouldn't have caught this nearly as fast -- the bug only shows up outside the extension's own execution context.&lt;/p&gt;

&lt;h2&gt;
  
  
  The three bugs
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;The blank page came from &lt;code&gt;if (chrome &amp;amp;&amp;amp; chrome.storage...)&lt;/code&gt;. Referencing an undefined global directly throws a ReferenceError -- it needs &lt;code&gt;typeof chrome !== "undefined"&lt;/code&gt; first. Outside the extension's own context, that one line crashed the entire script silently, before the board ever rendered.&lt;/li&gt;
&lt;li&gt;A footer link read "More puzzles \u2192" -- literally, backslash-u-2192, not an arrow. HTML doesn't interpret JS-style unicode escapes in plain text; that syntax only works inside a JS string. Needed the actual character or an HTML entity.&lt;/li&gt;
&lt;li&gt;That same footer link pointed at one specific book's ASIN, even though the extension rotates through three difficulty levels tied to three different books. Fixed by linking to a series search instead of a single title.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What actually got covered
&lt;/h2&gt;

&lt;p&gt;After the fixes: cell input, wrong-answer detection (filled every empty cell with the same digit, confirmed the right ones got flagged red), reveal-then-check, difficulty switching, and localStorage persistence across a page reload. All driven the same way -- click, type, screenshot, verify -- not asserted from reading the source.&lt;/p&gt;

&lt;p&gt;It's live on the Chrome Web Store now -- free, no tracking, puzzles bundled and verified offline. Link in the comments.&lt;/p&gt;

</description>
      <category>testing</category>
      <category>javascript</category>
      <category>showdev</category>
    </item>
    <item>
      <title>Notion's paid "Automations" feature isn't required for spaced repetition. Here's the free-plan version.</title>
      <dc:creator>Wajdy Mustafa</dc:creator>
      <pubDate>Thu, 03 Sep 2026 03:22:33 +0000</pubDate>
      <link>https://dev.to/wajdy_mustafa_f2d71f0be44/notions-paid-automations-feature-isnt-required-for-spaced-repetition-heres-the-free-plan-2onn</link>
      <guid>https://dev.to/wajdy_mustafa_f2d71f0be44/notions-paid-automations-feature-isnt-required-for-spaced-repetition-heres-the-free-plan-2onn</guid>
      <description>&lt;p&gt;I built a spaced repetition flashcard template in Notion using the actual SM-2 algorithm (the one behind Anki), not a simplified guess. Along the way I hit a real platform constraint worth knowing about if you're building anything similar.&lt;/p&gt;

&lt;h2&gt;
  
  
  The algorithm, actually implemented correctly
&lt;/h2&gt;

&lt;p&gt;SM-2 tracks three numbers per card: an ease factor (starts at 2.5), an interval, and a repetition count. Rate your recall 0-5 after each review, and the algorithm decides how many days until you see that card again -- longer each time you get it right, reset to 1 day the moment you forget it. I cross-checked the exact 1987 Wozniak formula against a working implementation before writing a single formula, rather than reconstructing it from memory.&lt;/p&gt;

&lt;h2&gt;
  
  
  The wall: Notion's Automations are a paid feature
&lt;/h2&gt;

&lt;p&gt;The obvious design: a database automation that updates ease factor, interval, and repetitions the instant you rate a card. Clean, one-click, no manual math. Except Notion's "when property changes, edit another property" automations sit behind a plan upgrade -- I only found out by actually opening the automations panel, not by reading pricing docs in advance.&lt;/p&gt;

&lt;h2&gt;
  
  
  The free-plan workaround
&lt;/h2&gt;

&lt;p&gt;Formula properties don't need Automations -- they just compute and display a value from other properties, live, on any plan. So instead of auto-updating the real fields, I added three formula columns -- Suggested Ease Factor, Suggested Interval, Suggested Repetitions -- that calculate the correct next values the moment you set a rating. You copy those three numbers into the real fields yourself. Two extra clicks per review, zero dollars a month, same correct math.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checked, not assumed
&lt;/h2&gt;

&lt;p&gt;I hand-calculated two scenarios before trusting the formulas: a perfect recall (ease factor 2.5 -&amp;gt; 2.6, interval -&amp;gt; 1 day) and a total failure (ease factor 2.5 -&amp;gt; 1.7, interval and repetitions both reset). Notion's live formula preview matched both by hand, exactly. Small thing, but it's the difference between a template that looks right and one that actually is.&lt;/p&gt;

</description>
      <category>notion</category>
      <category>productivity</category>
      <category>showdev</category>
    </item>
    <item>
      <title>I verified a spreadsheet's formulas against a from-scratch simulation. Found 3 bugs before anyone else could.</title>
      <dc:creator>Wajdy Mustafa</dc:creator>
      <pubDate>Tue, 01 Sep 2026 17:46:59 +0000</pubDate>
      <link>https://dev.to/wajdy_mustafa_f2d71f0be44/i-verified-a-spreadsheets-formulas-against-a-from-scratch-simulation-found-3-bugs-before-anyone-515m</link>
      <guid>https://dev.to/wajdy_mustafa_f2d71f0be44/i-verified-a-spreadsheets-formulas-against-a-from-scratch-simulation-found-3-bugs-before-anyone-515m</guid>
      <description>&lt;p&gt;I built a personal finance spreadsheet with a debt payoff cascade: up to 5 debts, a custom priority order, and 60 months of month-by-month projection. The interesting part wasn't the UI, it was proving the math was actually right.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem with "the formulas evaluate cleanly"
&lt;/h2&gt;

&lt;p&gt;A recalc pass telling you a spreadsheet has zero formula errors proves the formulas ran. It doesn't prove they computed the right numbers. That gap matters most exactly where the logic is hardest: a debt payoff planner where extra payments cascade from one debt to the next as each gets paid off, in whatever priority order the user picks.&lt;/p&gt;

&lt;p&gt;So I wrote a second, completely independent implementation in Python -- a plain month-by-month simulation with no spreadsheet functions at all -- and diffed every cell against it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What that caught
&lt;/h2&gt;

&lt;p&gt;Three real bugs, none of which a clean recalc would ever surface:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;An off-by-one in a summary formula's range that silently pulled from the wrong row&lt;/li&gt;
&lt;li&gt;A print area that excluded the entire 60-row schedule table -- looked fine on screen, would have printed blank&lt;/li&gt;
&lt;li&gt;Column widths that truncated labels so "Annual Interest Rate" read as "Annual Inter"&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;None of these are exotic. That's the point -- they're exactly the kind of thing that hides behind "0 errors" in a recalc log, and exactly the kind of thing a from-scratch independent check is designed to catch. The final cascade -- 5 debts, 60 months, 1,200 data points -- matched the reference simulation to within 5e-12.&lt;/p&gt;

&lt;p&gt;Packaged the result as a small finance toolkit (budget tracker, this debt payoff planner, a loan amortization calculator, a savings compound-growth projector) -- link in the comments if anyone wants to see the actual sheet.&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>productivity</category>
      <category>testing</category>
    </item>
    <item>
      <title>52% of tested MCP server endpoints were completely dead</title>
      <dc:creator>Wajdy Mustafa</dc:creator>
      <pubDate>Sat, 29 Aug 2026 22:09:39 +0000</pubDate>
      <link>https://dev.to/wajdy_mustafa_f2d71f0be44/52-of-tested-mcp-server-endpoints-were-completely-dead-1li1</link>
      <guid>https://dev.to/wajdy_mustafa_f2d71f0be44/52-of-tested-mcp-server-endpoints-were-completely-dead-1li1</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://n8nkit.com/blog-mcp-server-reliability.html" rel="noopener noreferrer"&gt;n8nkit.com&lt;/a&gt;.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A 2026 analysis of over 2,100 remote MCP server endpoints found that more than half were completely dead. Not erroring. Not timing out with a clear signal. Just not working ΓÇö while still accepting a connection.&lt;/p&gt;

&lt;p&gt;That statistic points at a category error most health checks make: treating "connected" and "working" as the same fact.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why this failure mode is easy to miss
&lt;/h2&gt;

&lt;p&gt;Most monitoring instinct comes from web services, where "connected" and "working" are close enough that conflating them rarely costs you. MCP breaks that assumption.&lt;/p&gt;

&lt;p&gt;The protocol layer (does the connection open) and the application layer (does a real tool call return a correct result) are genuinely separate questions. A server can complete a handshake, report itself as reachable, and still fail every actual tool call it receives. A connection-only check sees a green light. A user sees nothing happen.&lt;/p&gt;

&lt;p&gt;There's a second, quieter problem in the same neighborhood: &lt;strong&gt;MCP stdio servers communicate over stdout.&lt;/strong&gt; A single stray &lt;code&gt;print()&lt;/code&gt; or &lt;code&gt;console.log()&lt;/code&gt; ΓÇö the most natural debugging instinct there is ΓÇö writes directly into the protocol stream and corrupts every message that follows it.&lt;/p&gt;

&lt;p&gt;This is a documented, common mistake rather than an edge case, precisely &lt;em&gt;because&lt;/em&gt; logging to stdout is the default reflex for most developers.&lt;/p&gt;

&lt;h2&gt;
  
  
  What a real health check has to do
&lt;/h2&gt;

&lt;p&gt;The fix isn't more monitoring. It's monitoring the right thing.&lt;/p&gt;

&lt;p&gt;A health check that actually catches this has to make a round-trip tool call and verify the response, &lt;strong&gt;separately&lt;/strong&gt; from checking that the connection opened:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;check_server_health&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;connect_fn&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;probe_fn&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;timeout_seconds&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;10.0&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;start&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;monotonic&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;connection&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;connect_fn&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="nb"&gt;Exception&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nc"&gt;Result&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;healthy&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;connect failed: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="nf"&gt;probe_fn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;connection&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="c1"&gt;# a real tool call, not a ping
&lt;/span&gt;    &lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="nb"&gt;Exception&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nc"&gt;Result&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;healthy&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;False&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;probe failed: &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nc"&gt;Result&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;healthy&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                  &lt;span class="n"&gt;latency_ms&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;time&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;monotonic&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;start&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The distinction between &lt;code&gt;connect failed&lt;/code&gt; and &lt;code&gt;probe failed&lt;/code&gt; is the entire point. A server that connects but never responds correctly is exactly the case a connection-only check reports as healthy.&lt;/p&gt;

&lt;h2&gt;
  
  
  The third piece: what happens after a connection drops
&lt;/h2&gt;

&lt;p&gt;Connections dropping mid-session is its own documented pattern, and MCP's protocol doesn't specify a standard recovery behavior. Without an explicit reconnection strategy, a dropped connection just means the integration silently stops working until something notices.&lt;/p&gt;

&lt;p&gt;Worth distinguishing two cases when you build this: a &lt;strong&gt;connection error&lt;/strong&gt; should trigger reconnect-and-retry, but a &lt;strong&gt;real application error&lt;/strong&gt; should propagate immediately. Retrying a genuine bug just turns a fast failure into a slow one.&lt;/p&gt;

&lt;h2&gt;
  
  
  If it's useful
&lt;/h2&gt;

&lt;p&gt;We packaged these three pieces ΓÇö health checks that separate connected from working, reconnection with backoff, and a logger that can't corrupt a stdio transport ΓÇö into a small kit, tested with 11 cases including the exact silent-failure scenario above: &lt;a href="https://n8nkitshop.gumroad.com/l/spsyvl" rel="noopener noreferrer"&gt;MCP Server Reliability Kit&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The patterns themselves are straightforward enough to build yourself from the sketch above, and honestly that's a fine outcome too. The 52% number is the part worth taking away.&lt;/p&gt;

</description>
      <category>mcp</category>
      <category>ai</category>
      <category>python</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
