<?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: David Clarke</title>
    <description>The latest articles on DEV Community by David Clarke (@david_clarke_75b673b4a1ff).</description>
    <link>https://dev.to/david_clarke_75b673b4a1ff</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3525369%2F5584e1b9-ed96-4ac2-91e7-a3a9b4f89147.png</url>
      <title>DEV Community: David Clarke</title>
      <link>https://dev.to/david_clarke_75b673b4a1ff</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/david_clarke_75b673b4a1ff"/>
    <language>en</language>
    <item>
      <title>How I Built a PC Bottleneck Calculator and the Lessons Learned</title>
      <dc:creator>David Clarke</dc:creator>
      <pubDate>Thu, 02 Oct 2025 05:36:36 +0000</pubDate>
      <link>https://dev.to/david_clarke_75b673b4a1ff/how-i-built-a-pc-bottleneck-calculator-and-the-lessons-learned-5dge</link>
      <guid>https://dev.to/david_clarke_75b673b4a1ff/how-i-built-a-pc-bottleneck-calculator-and-the-lessons-learned-5dge</guid>
      <description>&lt;p&gt;When I started looking into PC building, one of the most confusing topics I ran into was bottlenecks. Everyone on forums had strong opinions, but there was never a clear or simple way to check if a CPU and GPU would work well together. Some said it depends on the game, others said it is all about benchmarks, and many simply said “it depends.”&lt;br&gt;
That confusion gave me the idea to build a simple tool: a PC Bottleneck Calculator. It lets you pick a CPU and GPU from a list and tells you the bottleneck percentage. The lower the percentage, the better the balance.&lt;/p&gt;
&lt;h2&gt;
  
  
  What is a bottleneck
&lt;/h2&gt;

&lt;p&gt;In simple words, a bottleneck happens when one component is holding back the performance of the other.&lt;br&gt;
• If you use a very strong GPU with a weak CPU, the GPU will sit idle because the CPU cannot process instructions fast enough.&lt;br&gt;
• If you use a powerful CPU with a low tier GPU, the CPU will be underutilized because the GPU cannot keep up.&lt;br&gt;
The key point is that bottlenecks are not about “bad hardware.” They are about balance. Even good parts can bottleneck each other if they are mismatched.&lt;/p&gt;
&lt;h2&gt;
  
  
  How the calculator works
&lt;/h2&gt;

&lt;p&gt;The goal of the calculator was to give users a quick way to see whether their build was balanced without having to read through dozens of benchmarks.&lt;br&gt;
Here is the simple logic:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; Each CPU and GPU is given a performance score.&lt;/li&gt;
&lt;li&gt; The scores are compared.&lt;/li&gt;
&lt;li&gt; The calculator shows the percentage of how much one part is limiting the other.
Unlike some tools that show a “match score” where higher is better, my tool shows the bottleneck percentage, where lower is better.
For example:
• If the bottleneck is below 10  percent, the build is very balanced.
• If it is 20-30 percent, you will notice some limitations.
• If it is above 30 percent or more, one part is clearly holding back the other.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnh6khqefzoyc5nhrwz73.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnh6khqefzoyc5nhrwz73.JPG" alt=" " width="800" height="458"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  The core code
&lt;/h2&gt;

&lt;p&gt;Here is a simplified version of the calculation logic:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
  &amp;lt;meta charset="utf-8"&amp;gt;
  &amp;lt;title&amp;gt;PC Bottleneck Calculator&amp;lt;/title&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
  &amp;lt;h2&amp;gt;Check CPU and GPU Bottleneck&amp;lt;/h2&amp;gt;
  &amp;lt;select id="cpu"&amp;gt;
    &amp;lt;option value="95"&amp;gt;Intel Core i9-14900K&amp;lt;/option&amp;gt;
    &amp;lt;option value="75"&amp;gt;Ryzen 5 5600&amp;lt;/option&amp;gt;
    &amp;lt;option value="60"&amp;gt;Intel Core i5-10400F&amp;lt;/option&amp;gt;
  &amp;lt;/select&amp;gt;

  &amp;lt;select id="gpu"&amp;gt;
    &amp;lt;option value="100"&amp;gt;NVIDIA RTX 4090&amp;lt;/option&amp;gt;
    &amp;lt;option value="85"&amp;gt;NVIDIA RTX 4070&amp;lt;/option&amp;gt;
    &amp;lt;option value="65"&amp;gt;GTX 1660 Super&amp;lt;/option&amp;gt;
  &amp;lt;/select&amp;gt;

  &amp;lt;button onclick="calculate()"&amp;gt;Calculate&amp;lt;/button&amp;gt;
  &amp;lt;p id="result"&amp;gt;&amp;lt;/p&amp;gt;

  &amp;lt;script&amp;gt;
    function calculate() {
      const cpuScore = parseFloat(document.getElementById("cpu").value);
      const gpuScore = parseFloat(document.getElementById("gpu").value);

      const weaker = Math.min(cpuScore, gpuScore);
      const stronger = Math.max(cpuScore, gpuScore);

      const bottleneck = ((stronger - weaker) / stronger * 100).toFixed(1);

      document.getElementById("result").innerText = 
        `Estimated Bottleneck: ${bottleneck}% (lower is better)`;
    }
  &amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open this in a browser, pick a CPU and GPU, and you will see the bottleneck percentage right away (Its demo). The &lt;strong&gt;real version on my site uses a much larger dataset&lt;/strong&gt;, but the core idea is the same.&lt;/p&gt;

&lt;h2&gt;
  
  
  Challenges I faced
&lt;/h2&gt;

&lt;p&gt;• Data accuracy: Getting performance scores that reflect real world performance is tricky. Benchmarks differ from site to site, and results vary by workload. I had to normalize scores to keep comparisons consistent.&lt;br&gt;
• Explaining results: A percentage alone is not helpful. I added explanations to tell users whether the bottleneck is minor, noticeable, or severe.&lt;br&gt;
• Edge cases: Older CPUs or integrated graphics sometimes broke the logic. I had to add conditions so the tool does not give misleading results.&lt;br&gt;
What I learned&lt;br&gt;
• You do not need a huge framework or complex backend to make something useful. This project was built with plain HTML, CSS, and JavaScript.&lt;br&gt;
• Clear communication matters more than complex math. The hardest part was explaining what the percentage really means to an everyday PC builder.&lt;br&gt;
• Even a small tool can save time and help people. What started as a personal experiment turned into something useful for anyone planning a new PC build.&lt;br&gt;
Try it out&lt;br&gt;
If you are curious, you can try the full version here: &lt;a href="https://pcbottleneckcalculator.io" rel="noopener noreferrer"&gt;https://pcbottleneckcalculator.io&lt;/a&gt;&lt;br&gt;
It might save you some frustration before buying parts that do not work well together.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>showdev</category>
      <category>productivity</category>
    </item>
    <item>
      <title>How I Built My First Web Tool as a Developer (and What I Learned Along the Way)</title>
      <dc:creator>David Clarke</dc:creator>
      <pubDate>Tue, 23 Sep 2025 21:55:03 +0000</pubDate>
      <link>https://dev.to/david_clarke_75b673b4a1ff/how-i-built-my-first-web-tool-as-a-developer-and-what-i-learned-along-the-way-4dok</link>
      <guid>https://dev.to/david_clarke_75b673b4a1ff/how-i-built-my-first-web-tool-as-a-developer-and-what-i-learned-along-the-way-4dok</guid>
      <description>&lt;p&gt;Like most beginner web developers, I spent a lot of time following tutorials and building “to-do apps” that never made it beyond my own computer. They were good practice, but I wanted to build something real that people could actually use.&lt;br&gt;
That’s how I ended up creating a gamepad tester a small web tool that lets you check whether your game controller is working properly right in the browser.&lt;/p&gt;
&lt;h2&gt;
  
  
  The Idea
&lt;/h2&gt;

&lt;p&gt;The inspiration came from frustration. I plugged in my Xbox controller one day, and it just wasn’t behaving right in a game. Was it the controller, the USB cable, or the game itself?&lt;br&gt;
I thought: Wouldn’t it be great to have a quick online tool that tells me if all buttons and sticks are responding?&lt;br&gt;
Turns out the browser already has a neat feature for this: the HTML5 Gamepad API. That was enough to spark the project.&lt;/p&gt;
&lt;h2&gt;
  
  
  Building the Tool
&lt;/h2&gt;

&lt;p&gt;I didn’t overcomplicate it. Just HTML, CSS, and JavaScript.&lt;br&gt;
Here’s a simplified version of the core script that detects and displays button presses and stick movement:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!DOCTYPE html&amp;gt;
&amp;lt;html&amp;gt;
&amp;lt;head&amp;gt;
  &amp;lt;meta charset="utf-8"&amp;gt;
  &amp;lt;title&amp;gt;Gamepad Tester&amp;lt;/title&amp;gt;
  &amp;lt;style&amp;gt;
    body { font-family: sans-serif; }
    .button {
      display: inline-block;
      width: 40px; height: 40px;
      margin: 5px; text-align: center; line-height: 40px;
      border: 1px solid #333; border-radius: 8px;
    }
    .pressed { background: #4caf50; color: white; }
  &amp;lt;/style&amp;gt;
&amp;lt;/head&amp;gt;
&amp;lt;body&amp;gt;
  &amp;lt;h2&amp;gt;Press any button on your controller to start&amp;lt;/h2&amp;gt;
  &amp;lt;div id="buttons"&amp;gt;&amp;lt;/div&amp;gt;
  &amp;lt;script&amp;gt;
    let controllers = {};

    function connectHandler(e) {
      addGamepad(e.gamepad);
    }

    function addGamepad(gamepad) {
      controllers[gamepad.index] = gamepad;
      const buttonsDiv = document.getElementById("buttons");
      buttonsDiv.innerHTML = "";
      gamepad.buttons.forEach((btn, i) =&amp;gt; {
        const b = document.createElement("div");
        b.className = "button";
        b.innerText = i;
        buttonsDiv.appendChild(b);
      });
      requestAnimationFrame(updateStatus);
    }

    function updateStatus() {
      scanGamepads();
      for (let j in controllers) {
        const controller = controllers[j];
        const buttons = document.getElementById("buttons").children;
        controller.buttons.forEach((btn, i) =&amp;gt; {
          if (btn.pressed) {
            buttons[i].classList.add("pressed");
          } else {
            buttons[i].classList.remove("pressed");
          }
        });
      }
      requestAnimationFrame(updateStatus);
    }

    function scanGamepads() {
      const gamepads = navigator.getGamepads();
      for (let i = 0; i &amp;lt; gamepads.length; i++) {
        if (gamepads[i]) controllers[gamepads[i].index] = gamepads[i];
      }
    }

    window.addEventListener("gamepadconnected", connectHandler);
  &amp;lt;/script&amp;gt;
&amp;lt;/body&amp;gt;
&amp;lt;/html&amp;gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Open this in your browser, plug in a controller, and you will see the buttons light up when pressed. It’s a very stripped-down version of what I later turned into gamepadtest.com but the principle is the same.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Learned
&lt;/h2&gt;

&lt;p&gt;• Start small: You don’t need React, a backend, or a database to make something useful.&lt;br&gt;
• APIs are fun: Browsers can do more than you think. The Gamepad API was surprisingly powerful once I understood it.&lt;br&gt;
• Feedback is gold: Friends tested it and pointed out things I never thought of, like displaying joystick axes.&lt;br&gt;
• Shipping feels amazing: Even though it was a small project, publishing it online felt better than any tutorial app I had ever built.&lt;/p&gt;

&lt;p&gt;Building my first web tool taught me that it’s not about making something huge or perfect. It’s about making something useful, no matter how small.&lt;br&gt;
If you want to try out the full version I built, check out &lt;a href="https://gamepadtester.co" rel="noopener noreferrer"&gt;https://gamepadtester.co&lt;/a&gt;. It might save you some frustration the next time your controller acts up.&lt;/p&gt;

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