<?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: Irfan Ullah</title>
    <description>The latest articles on DEV Community by Irfan Ullah (@irfanullah).</description>
    <link>https://dev.to/irfanullah</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%2F4181603%2Fa75acdba-a206-4589-88d8-d75af957d655.png</url>
      <title>DEV Community: Irfan Ullah</title>
      <link>https://dev.to/irfanullah</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/irfanullah"/>
    <language>en</language>
    <item>
      <title>Why My IQ Test Has a 15-Minute Timer (and Why That's Harder Than It Sounds)</title>
      <dc:creator>Irfan Ullah</dc:creator>
      <pubDate>Sat, 31 Oct 2026 05:24:20 +0000</pubDate>
      <link>https://dev.to/irfanullah/why-my-iq-test-has-a-15-minute-timer-and-why-thats-harder-than-it-sounds-48ha</link>
      <guid>https://dev.to/irfanullah/why-my-iq-test-has-a-15-minute-timer-and-why-thats-harder-than-it-sounds-48ha</guid>
      <description>&lt;h1&gt;
  
  
  Why My IQ Test Has a 15-Minute Timer (and Why That's Harder Than It Sounds)
&lt;/h1&gt;

&lt;p&gt;When I published my first post here about how the scoring on IQCognify works, a few people asked about the other design decision that shapes every result: the timer. The test gives you 15 minutes for the full run. That number wasn't picked to create pressure. It exists because of what the test is trying to measure — and enforcing it fairly in a browser turned out to be one of the harder engineering problems in the whole project.&lt;/p&gt;

&lt;h2&gt;
  
  
  Timing is part of the measurement
&lt;/h2&gt;

&lt;p&gt;Working memory and processing speed are real components of cognitive ability, and every standardized test accounts for them. An untimed puzzle test mostly measures how long you're willing to sit there. A timed one measures something closer to how you actually think: pattern recognition under mild constraint, decisions made without infinite deliberation.&lt;/p&gt;

&lt;p&gt;But the moment you add a timer, you take on an obligation: the clock has to be &lt;em&gt;fair&lt;/em&gt;. A fair timer never punishes someone for a slow network, a background tab, or a laptop that decided to run a virus scan mid-test.&lt;/p&gt;

&lt;h2&gt;
  
  
  The three ways a browser timer lies
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Tab switches.&lt;/strong&gt; Browsers throttle JavaScript timers in inactive tabs — a &lt;code&gt;setInterval&lt;/code&gt; that fires every second in the foreground may fire once a minute in the background. Count ticks and your clock drifts. The fix is to never count ticks at all: record a start timestamp, and compute elapsed time from &lt;code&gt;Date.now()&lt;/code&gt; differences every time the UI updates. Throttling then affects how often the display refreshes, never how much time has actually passed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Slow asset loading.&lt;/strong&gt; If question images load lazily, a user on a slow connection spends their 15 minutes watching spinners. Every question asset in the test is tiny and preloaded before the clock starts, so the measured time is thinking time, not download time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Server round-trips.&lt;/strong&gt; If the timer lives on the server, latency becomes part of the test. The whole run — questions, timing, scoring — happens client-side. The server never gets a vote on how long you took.&lt;/p&gt;

&lt;h2&gt;
  
  
  The edge case nobody warns you about
&lt;/h2&gt;

&lt;p&gt;Sleep. A laptop closing mid-test can produce a four-hour "elapsed time" on wake. The honest handling is to detect a discontinuous jump in elapsed time and end the session rather than score it — an unscored attempt is a better outcome than a garbage score presented as real. Silent data corruption is worse than a lost session, in testing and everywhere else.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why 15 minutes
&lt;/h2&gt;

&lt;p&gt;Long enough that the constraint is mild for most people, short enough that speed still differentiates. It's a calibration choice, and like the scoring model, it should be a deliberate one — if you build anything similar, decide what your timer is &lt;em&gt;for&lt;/em&gt; before you decide how long it is.&lt;/p&gt;

&lt;p&gt;The test itself is live at &lt;a href="https://iqcognify.com" rel="noopener noreferrer"&gt;IQCognify&lt;/a&gt; if you want to see the timer behave — 27 questions, no signup, and your time is measured by timestamps, not ticks.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>testing</category>
      <category>psychology</category>
    </item>
    <item>
      <title>Building a Free IQ Test Site: What Goes Into Scoring</title>
      <dc:creator>Irfan Ullah</dc:creator>
      <pubDate>Tue, 13 Oct 2026 08:23:07 +0000</pubDate>
      <link>https://dev.to/irfanullah/building-a-free-iq-test-site-what-goes-into-scoring-58e4</link>
      <guid>https://dev.to/irfanullah/building-a-free-iq-test-site-what-goes-into-scoring-58e4</guid>
      <description>&lt;p&gt;When I set out to build IQCognify, I thought the hard part would be the questions. It wasn't. Writing pattern-recognition and logic puzzles is fun. The hard part was everything around them: making the test fair, making the score mean something, and making the whole thing run fast in a browser with no signup wall.&lt;/p&gt;

&lt;h2&gt;
  
  
  The score has to mean something
&lt;/h2&gt;

&lt;p&gt;An IQ score only works because it is normalized. By definition, 100 is the average, and the scale uses a standard deviation of 15. That means a score of 115 is one standard deviation above average, 130 is two. If your scoring is sloppy — if the questions are too easy, or the mix is unbalanced — the numbers stop meaning anything.&lt;/p&gt;

&lt;p&gt;So before I wrote a single question, I decided on the structure: a fixed number of items, balanced across pattern recognition, logical reasoning, and spatial puzzles. Every question type gets equal weight. No question is a trick. A test that measures how well you know trivia is not an IQ test.&lt;/p&gt;

&lt;h2&gt;
  
  
  Timing is part of the test
&lt;/h2&gt;

&lt;p&gt;Working memory and processing speed are part of what these tests measure, so the test is timed — 15 minutes for the full run. That created a real engineering constraint: the timer has to be reliable, survive tab switches gracefully, and never punish someone for a slow connection. I keep all question assets tiny and preloaded so the test itself never stalls.&lt;/p&gt;

&lt;h2&gt;
  
  
  No signup, no friction
&lt;/h2&gt;

&lt;p&gt;I made a deliberate decision: no account, no email gate, no paywall. You open the site, you take the test, you get your score breakdown. That choice costs me the usual retention tricks, but it is the whole point of the project — quality cognitive assessment that anyone can use.&lt;/p&gt;

&lt;p&gt;The result is live at &lt;a href="https://iqcognify.com" rel="noopener noreferrer"&gt;IQCognify&lt;/a&gt; — a free IQ test with an instant score breakdown. If you build anything similar, start with the scoring model, not the questions. The questions are the easy part.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
