<?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: Ashwani Sharma</title>
    <description>The latest articles on DEV Community by Ashwani Sharma (@ashhwani).</description>
    <link>https://dev.to/ashhwani</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%2F4090723%2F9110d754-40bb-44f5-b2e1-398b04af5ef0.jpg</url>
      <title>DEV Community: Ashwani Sharma</title>
      <link>https://dev.to/ashhwani</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ashhwani"/>
    <language>en</language>
    <item>
      <title>I built a daily JavaScript puzzle game where a wrong answer physically can't ship</title>
      <dc:creator>Ashwani Sharma</dc:creator>
      <pubDate>Sun, 23 Aug 2026 11:15:57 +0000</pubDate>
      <link>https://dev.to/ashhwani/i-built-a-daily-javascript-puzzle-game-where-a-wrong-answer-physically-cant-ship-4pih</link>
      <guid>https://dev.to/ashhwani/i-built-a-daily-javascript-puzzle-game-where-a-wrong-answer-physically-cant-ship-4pih</guid>
      <description>&lt;p&gt;&lt;code&gt;[] + {}&lt;/code&gt; — do you &lt;em&gt;know&lt;/em&gt; what that prints, or do you think you know?&lt;/p&gt;

&lt;p&gt;That gap is the whole idea behind &lt;a href="https://whatstheoutput.online" rel="noopener noreferrer"&gt;What's the Output?&lt;/a&gt;&lt;br&gt;
— a daily Wordle-style game: one JS snippet per day, three tries to type&lt;br&gt;
exactly what it prints, hints when you miss, an explanation of the trap when&lt;br&gt;
you're done.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The rule that shaped the build:&lt;/strong&gt; on a site whose brand is "predict the&lt;br&gt;
output," publishing a wrong answer even once is death. So the puzzle bank is&lt;br&gt;
defended by tests, not care:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Every snippet is executed in real Node inside the test suite, and the
captured stdout must equal the declared answer — run twice, so
nondeterministic snippets can't sneak in.&lt;/li&gt;
&lt;li&gt;A "winnability" test proves that typing the revealed answer always wins
(this caught two puzzles that were impossible to win — my answer normalizer
stripped &lt;code&gt;""&lt;/code&gt; down to an empty string while the server hashed it as-is).&lt;/li&gt;
&lt;li&gt;Hints are linted too: a hint like "5 characters" on a boolean output &lt;em&gt;is&lt;/em&gt;
the answer (&lt;code&gt;false&lt;/code&gt; = 5 letters). There's a test that rejects that pattern
now.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Stack, for the curious:&lt;/strong&gt; Next.js ISR (the puzzle rotates at 00:00 UTC with&lt;br&gt;
no deploy), no database, no accounts — streaks live in localStorage. The&lt;br&gt;
answer ships as a SHA-256 hash; your guess is normalized and hashed&lt;br&gt;
client-side. Yesterday's puzzles become public explanation pages.&lt;/p&gt;

&lt;p&gt;It's free, and there's a new one every day at 00:00 UTC:&lt;br&gt;
&lt;strong&gt;&lt;a href="https://whatstheoutput.online" rel="noopener noreferrer"&gt;whatstheoutput.online&lt;/a&gt;&lt;/strong&gt;. If you break your&lt;br&gt;
streak on day one, the explanation is the consolation prize.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>showdev</category>
      <category>testing</category>
    </item>
  </channel>
</rss>
