<?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: ke ja</title>
    <description>The latest articles on DEV Community by ke ja (@ke_ja_6b55).</description>
    <link>https://dev.to/ke_ja_6b55</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%2F4223267%2F862d6804-daf4-413e-ad4d-7b1e85eeef13.jpg</url>
      <title>DEV Community: ke ja</title>
      <link>https://dev.to/ke_ja_6b55</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ke_ja_6b55"/>
    <language>en</language>
    <item>
      <title>Fast-Food Prices Aren't National. We Sampled 2,072 Restaurants to Prove It.</title>
      <dc:creator>ke ja</dc:creator>
      <pubDate>Thu, 19 Nov 2026 03:05:09 +0000</pubDate>
      <link>https://dev.to/ke_ja_6b55/fast-food-prices-arent-national-we-sampled-2072-restaurants-to-prove-it-22g0</link>
      <guid>https://dev.to/ke_ja_6b55/fast-food-prices-arent-national-we-sampled-2072-restaurants-to-prove-it-22g0</guid>
      <description>&lt;h1&gt;
  
  
  Fast-Food Prices Aren't National. We Sampled 2,072 Restaurants to Prove It.
&lt;/h1&gt;

&lt;p&gt;Every fast-food price list on the internet pretends there is one price for a menu item. There isn't. Order the same item in two different towns and you can pay a dollar or two more — sometimes in the next town over.&lt;/p&gt;

&lt;p&gt;So instead of copying a single national menu, we built &lt;a href="https://menuticker.com" rel="noopener noreferrer"&gt;MenuTicker&lt;/a&gt; the slow way: we sampled real store menus from &lt;strong&gt;2,072 restaurants&lt;/strong&gt; across 15 US chains and published what each item actually costs — the median price, the typical range, and how many stores the number is based on.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the spread really looks like
&lt;/h2&gt;

&lt;p&gt;Take a Little Caesars Classic Pepperoni. Across 128 sampled stores the median is $6.99, but the typical range runs from $5.99 to $8.99. A $3 spread on a $7 pizza, inside one chain, for the exact same product.&lt;/p&gt;

&lt;p&gt;A chicken sandwich tells the same story across chains. In our &lt;a href="https://menuticker.com/compare/chicken-sandwiches/" rel="noopener noreferrer"&gt;chicken sandwich comparison&lt;/a&gt;, medians run from $5.29 (Chick-fil-A) to $6.99 (Jack in the Box), with KFC at $5.49 and Burger King at $5.89. "The price of a chicken sandwich" is not a number — it's a range with a chain attached.&lt;/p&gt;

&lt;h2&gt;
  
  
  Rules we hold the data to
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Medians, not list prices.&lt;/strong&gt; Every figure is the middle of real sampled store prices, shown with its 10th–90th percentile range.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Sample sizes in the open.&lt;/strong&gt; An item priced from 128 stores and an item priced from 4 stores do not get the same confidence label. Small samples are marked "Limited sample"; tiny ones show observed prices only.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;No invented numbers.&lt;/strong&gt; Where we could not verify counter prices (Popeyes, which only publishes catering menus), the site says "Price not tracked" instead of guessing.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Re-sampled monthly.&lt;/strong&gt; Prices are re-collected every month, so the &lt;a href="https://menuticker.com/price-changes/" rel="noopener noreferrer"&gt;price changes&lt;/a&gt; page can show what actually went up — from data, not press releases.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The full method is documented on the &lt;a href="https://menuticker.com/methodology/" rel="noopener noreferrer"&gt;methodology page&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Things you can do with it
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Find the genuinely &lt;a href="https://menuticker.com/cheapest-fast-food/" rel="noopener noreferrer"&gt;cheapest fast food&lt;/a&gt; — ranked by sampled medians, with sauces, drinks and add-ons kept in their own groups so a $0.25 dip cup never tops a "cheapest food" list.&lt;/li&gt;
&lt;li&gt;Browse &lt;a href="https://menuticker.com/meals-under-10/" rel="noopener noreferrer"&gt;meals under $10&lt;/a&gt; that are actually meals: combos, sandwiches, tacos and kids' meals, not a lone biscuit.&lt;/li&gt;
&lt;li&gt;Compare protein per dollar across chains, or build a meal inside a calorie and budget limit.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;MenuTicker covers 3,588 menu items today and is independent — not affiliated with any of the chains it tracks. If you plan drive-thru budgets, run a food channel, or just want to know whether your local store is the expensive one, the data is free to use: &lt;a href="https://menuticker.com" rel="noopener noreferrer"&gt;menuticker.com&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>sideprojects</category>
    </item>
    <item>
      <title>Will It Fit? Comparing Tire Sizes With the Numbers That Actually Matter</title>
      <dc:creator>ke ja</dc:creator>
      <pubDate>Thu, 19 Nov 2026 02:49:20 +0000</pubDate>
      <link>https://dev.to/ke_ja_6b55/will-it-fit-comparing-tire-sizes-with-the-numbers-that-actually-matter-525k</link>
      <guid>https://dev.to/ke_ja_6b55/will-it-fit-comparing-tire-sizes-with-the-numbers-that-actually-matter-525k</guid>
      <description>&lt;h1&gt;
  
  
  Will It Fit? Comparing Tire Sizes With the Numbers That Actually Matter
&lt;/h1&gt;

&lt;p&gt;Every tire forum thread starts the same way: "I'm running 225/65R17, can I switch to 265/70R17?" The honest answer is a handful of numbers, and &lt;a href="https://tirecalcpro.com/" rel="noopener noreferrer"&gt;TireCalcPro.com&lt;/a&gt; exists to put all of them on one screen: overall diameter, sidewall height, circumference, revolutions per mile, and what the change does to your speedometer.&lt;/p&gt;

&lt;h2&gt;
  
  
  A worked example
&lt;/h2&gt;

&lt;p&gt;The stock 225/65R17 stands 28.5 inches tall. The 265/70R17 stands 31.6 inches — over 10% larger. The old rule of thumb says stay within ±3% of the original diameter, and this swap blows through it: when the speedometer reads 60 mph you'd actually be doing about 66, the gearing effectively gets taller, and the tire needs room the wheel arch may not have. None of that is visible from the size codes alone, because the codes hide the arithmetic: width in millimetres, sidewall as a percentage of that width, wheel in inches — three unit systems in one label.&lt;/p&gt;

&lt;h2&gt;
  
  
  See it in the arch
&lt;/h2&gt;

&lt;p&gt;The piece I built that I haven't seen elsewhere: the new tire drawn inside your wheel arch, with the change in gap shown to scale and coloured by the real numbers — because "will it rub?" is a geometry question, and geometry is easier to judge with your eyes than with a spec table. Compare two sizes side by side, check the speedometer error, then look at the arch before you spend anything.&lt;/p&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Tire size comparison calculator: &lt;a href="https://tirecalcpro.com/" rel="noopener noreferrer"&gt;https://tirecalcpro.com/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>sideprojects</category>
    </item>
    <item>
      <title>What Score Do I Need — and What Will It Be Worth? Building CreditAndGPA</title>
      <dc:creator>ke ja</dc:creator>
      <pubDate>Wed, 18 Nov 2026 03:06:23 +0000</pubDate>
      <link>https://dev.to/ke_ja_6b55/what-score-do-i-need-and-what-will-it-be-worth-building-creditandgpa-5anh</link>
      <guid>https://dev.to/ke_ja_6b55/what-score-do-i-need-and-what-will-it-be-worth-building-creditandgpa-5anh</guid>
      <description>&lt;p&gt;Every spring, AP students ask the same two questions in the same breath: what score will I get, and what will my colleges give me for it? The answers live in two different places — College Board score distributions on one side, and thousands of individual college credit policies on the other. &lt;a href="https://creditandgpa.com/" rel="noopener noreferrer"&gt;CreditAndGPA.com&lt;/a&gt; puts them on the same site.&lt;/p&gt;

&lt;h2&gt;
  
  
  The calculators
&lt;/h2&gt;

&lt;p&gt;Score calculators for 38 AP subjects estimate your 1–5 score from your raw points, using each subject's published score distribution. They're labelled as what they are — modelled estimates with a margin, not leaked official curves, because College Board doesn't publish the real conversion tables. Alongside them sit the GPA tools: weighted and unweighted GPA, semester GPA, and the final-grade calculator that tells you what you need on the exam to keep the grade you want.&lt;/p&gt;

&lt;h2&gt;
  
  
  The credit database
&lt;/h2&gt;

&lt;p&gt;The second half is a searchable database of AP credit policies covering more than 2,000 colleges: the minimum score each school accepts for each subject, and what it grants — credit hours, course exemption, or nothing. Students are often surprised twice: a 3 earns real credit at one school and nothing at another, and a 5 sometimes buys no more than a 4. Checking before you register for the exam — or before you pick which scores to send — is the whole point.&lt;/p&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;AP score calculators, credit search and GPA tools: &lt;a href="https://creditandgpa.com/" rel="noopener noreferrer"&gt;https://creditandgpa.com/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>sideprojects</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How Big a Septic Tank Do You Need? Your State Has Already Decided</title>
      <dc:creator>ke ja</dc:creator>
      <pubDate>Tue, 17 Nov 2026 02:33:36 +0000</pubDate>
      <link>https://dev.to/ke_ja_6b55/h-2o7o</link>
      <guid>https://dev.to/ke_ja_6b55/h-2o7o</guid>
      <description>&lt;p&gt;Ask a forum how big a septic tank a three-bedroom house needs and you'll get one confident answer: 1,000 gallons. Ask Ohio and you'll get a different one: 1,500. Both are right — because septic tank minimums aren't set by physics or by custom, they're set state by state, in each state's own code, usually by bedroom count or by design flow in gallons per day.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the site does differently
&lt;/h2&gt;

&lt;p&gt;SepticSizeChart.com checks the rule where the rule actually lives. Every state page quotes that state's own minimum-size requirement with a citation to the code it came from — no national average dressed up as an answer. Ten states are verified line by line so far, and the chart pages show how the minimum moves with bedrooms: 1,000 gallons is the most common three-bedroom minimum in the country, but "most common" is not "yours".&lt;/p&gt;

&lt;h2&gt;
  
  
  The number behind the number
&lt;/h2&gt;

&lt;p&gt;Size also drives cost. A typical three-bedroom system in North Carolina runs about $6,900–$11,100 installed — and jumping a tank size because a state minimum demanded it is one of the reasons two identical houses in different states get very different quotes. If you're planning a build or a replacement, start with your state's rule, not with a national chart.&lt;/p&gt;

&lt;p&gt;Septic tank size charts and state rules: &lt;a href="https://septicsizechart.com/" rel="noopener noreferrer"&gt;https://septicsizechart.com/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>sideprojects</category>
    </item>
    <item>
      <title>The US Changed Its Freight Class Rules in July. Most Calculators Didn't Notice.</title>
      <dc:creator>ke ja</dc:creator>
      <pubDate>Mon, 09 Nov 2026 03:01:15 +0000</pubDate>
      <link>https://dev.to/ke_ja_6b55/the-us-changed-its-freight-class-rules-in-july-most-calculators-didnt-notice-498d</link>
      <guid>https://dev.to/ke_ja_6b55/the-us-changed-its-freight-class-rules-in-july-most-calculators-didnt-notice-498d</guid>
      <description>&lt;p&gt;In July 2025, the NMFTA rewrote the density scale that decides freight class for most LTL shipments in the US (Docket 2025-1, effective July 19, 2025). I built &lt;a href="https://checkfreightclass.com/" rel="noopener noreferrer"&gt;CheckFreightClass&lt;/a&gt; because a surprising share of the calculators online still answer from the old table — including answering "class 500" from density, which the current scale cannot produce at all.&lt;/p&gt;

&lt;h2&gt;
  
  
  What actually changed
&lt;/h2&gt;

&lt;p&gt;Most commodity items that used to carry their own printed class now classify by density alone, and the density scale grew from 11 to 13 classes. The scale in force today:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Density (lb per cubic foot)&lt;/th&gt;
&lt;th&gt;Freight class&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Under 1&lt;/td&gt;
&lt;td&gt;400&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1 to under 2&lt;/td&gt;
&lt;td&gt;300&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;2 to under 4&lt;/td&gt;
&lt;td&gt;250&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4 to under 6&lt;/td&gt;
&lt;td&gt;175&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;6 to under 8&lt;/td&gt;
&lt;td&gt;125&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;8 to under 10&lt;/td&gt;
&lt;td&gt;100&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;10 to under 12&lt;/td&gt;
&lt;td&gt;92.5&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;12 to under 15&lt;/td&gt;
&lt;td&gt;85&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;15 to under 22.5&lt;/td&gt;
&lt;td&gt;70&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;22.5 to under 30&lt;/td&gt;
&lt;td&gt;65&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;30 to under 35&lt;/td&gt;
&lt;td&gt;60&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;35 to under 50&lt;/td&gt;
&lt;td&gt;55&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;50 and over&lt;/td&gt;
&lt;td&gt;50&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;That single table is the whole engine. On the site it lives in exactly one place — one data file that the calculator, the &lt;a href="https://checkfreightclass.com/freight-class-chart/" rel="noopener noreferrer"&gt;printable freight class chart&lt;/a&gt; and the test page all read from. When the table is the product, duplicating it across pages is how you end up disagreeing with yourself.&lt;/p&gt;

&lt;h2&gt;
  
  
  The calculation, and the boundary that matters
&lt;/h2&gt;

&lt;p&gt;Density is weight divided by volume: measure each piece in inches (pallet and overhang included), divide cubic inches by 1,728 for cubic feet, then divide pounds by cubic feet.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;48 × 40 × 48 in at 500 lb → 53.33 ft³ → 9.38 lb/ft³ → &lt;strong&gt;class 100&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;40 × 48 × 48 in at 20 lb → the same 53.33 ft³ → 0.38 lb/ft³ → &lt;strong&gt;class 400&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The boundaries are where calculators quietly differ, so I published the test cases instead of asking anyone to trust the tool: the &lt;a href="https://checkfreightclass.com/calculator-test/" rel="noopener noreferrer"&gt;public test page&lt;/a&gt; lists inputs and the class the current scale should give, including the exact-boundary case at 10.00 lb/ft³, which belongs to 92.5, not 100. If your calculator disagrees, the page shows its working.&lt;/p&gt;

&lt;h2&gt;
  
  
  Three mistakes that cost shippers money
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Pooling pieces into one density.&lt;/strong&gt; Two pieces with different densities classed as one blended number can push the whole shipment into a worse class. Class each piece on its own.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Using a pre-2025 table.&lt;/strong&gt; Any chart showing 18 classes, or a density band ending at class 500, predates the current scale.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Forgetting the pallet.&lt;/strong&gt; Height and weight are measured on the complete loaded piece — pallet, wrap and all. A few inches of pallet height moves the density, and the density moves the class.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Why a test page
&lt;/h2&gt;

&lt;p&gt;The pattern I keep coming back to on these small tool sites: don't just ship the calculator, ship the evidence that it's right. A page of worked cases with expected outputs costs an afternoon, and it's the page that earns the link when someone in a forum thread asks "is this class right?" — because it answers the question instead of asking for trust.&lt;/p&gt;

&lt;p&gt;If you ship LTL and your quotes still come back with classes off the old scale, I'd genuinely like to hear what your carrier's audit adjusted and why.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>sideprojects</category>
      <category>logistics</category>
    </item>
    <item>
      <title>The Duty on the Invoice Is Never the Duty You Pay: Stacking the Real Cost of Importing</title>
      <dc:creator>ke ja</dc:creator>
      <pubDate>Sun, 08 Nov 2026 02:55:02 +0000</pubDate>
      <link>https://dev.to/ke_ja_6b55/the-duty-on-the-invoice-is-never-the-duty-you-pay-stacking-the-real-cost-of-importing-2jjp</link>
      <guid>https://dev.to/ke_ja_6b55/the-duty-on-the-invoice-is-never-the-duty-you-pay-stacking-the-real-cost-of-importing-2jjp</guid>
      <description>&lt;p&gt;The number on the invoice is never the duty you actually pay. I know because I built a lookup that shows the whole stack: &lt;a href="https://htsradar.com/" rel="noopener noreferrer"&gt;HTS Radar&lt;/a&gt; takes an HTS code and an origin country and returns the real US import duty — the base rate, plus Section 301, plus Section 232, plus antidumping and countervailing duties, plus fees — layer by layer, each from its official source. The interesting part wasn't the lookup. It was how many separate systems have to agree before a single "duty rate" means anything.&lt;/p&gt;

&lt;h2&gt;
  
  
  Layer one: the base rate is the least interesting number
&lt;/h2&gt;

&lt;p&gt;Every HTS code has a base rate in the US tariff schedule, and it is the number most tools stop at. It is also, very often, 0%. A product can sit at a 0% base rate and still cost you a quarter of its value at the border, because the base rate is only the first layer. The schedule itself is 29,000+ codes deep, and the hard part of a lookup isn't storing the table — it's matching what a human calls a product ("stainless steel water bottle") to the code the schedule actually means. Get the code wrong and every layer after it is wrong too, confidently.&lt;/p&gt;

&lt;h2&gt;
  
  
  Layer two: Section 301, the surcharge that rewrites the answer
&lt;/h2&gt;

&lt;p&gt;Section 301 tariffs apply on top of the base rate for goods from China, and they run from 7.5% to 100% depending on the product. This is where most "duty calculators" quietly fall over: they quote the base rate, or they quote a single blended number with no breakdown, and the importer finds out the difference when the customs broker's bill arrives. The stacking has to be explicit — base, then 301, then everything else — because each layer comes from a different authority and changes on a different schedule.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;landedDuty&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;code&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;origin&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;layers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nf"&gt;baseRate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;code&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;origin&lt;/span&gt;&lt;span class="p"&gt;)];&lt;/span&gt;
  &lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;origin&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;CN&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nx"&gt;layers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;section301&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;code&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
  &lt;span class="nx"&gt;layers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;section232&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;code&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;origin&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
  &lt;span class="nx"&gt;layers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(...&lt;/span&gt;&lt;span class="nf"&gt;antidumping&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;code&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;origin&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
  &lt;span class="nx"&gt;layers&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(...&lt;/span&gt;&lt;span class="nf"&gt;countervailing&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;code&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;origin&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;layers&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// never a single blended number&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A single blended number hides which layer moved when the total changes. Keep the layers separate and a duty change becomes a readable event: "Section 301 went from 25% to 50% on this code", not "your cost went up".&lt;/p&gt;

&lt;h2&gt;
  
  
  Layer three: AD/CVD, the cases that decide whole product lines
&lt;/h2&gt;

&lt;p&gt;Antidumping and countervailing duty cases are the sharpest layer. A single case can add 100%+ to a product's cost, and there are 890 of them active. They are also scope-defined: a case covers specific products from specific countries, and whether your product falls inside the scope is a reading exercise, not a lookup. The same HTS code can be inside scope for one producer and outside it for another. My rule for the site: a code is only ever flagged as a &lt;em&gt;possible&lt;/em&gt; match with the scope text next to it — never a definitive "you owe this rate". A confident wrong number at the border costs real money.&lt;/p&gt;

&lt;h2&gt;
  
  
  Layer four: the UFLPA list, where the question isn't the rate
&lt;/h2&gt;

&lt;p&gt;The Uyghur Forced Labor Prevention Act adds a different kind of check: 192 entities on the official list, and if your supplier touches one of them, the shipment can be stopped regardless of the duty math. This isn't a rate layer at all — it's a yes/no gate that sits beside the money. A lookup that only answers "how much?" and never asks "can this shipment enter?" is answering the wrong question for a growing share of importers.&lt;/p&gt;

&lt;h2&gt;
  
  
  The rule that held across all four layers
&lt;/h2&gt;

&lt;p&gt;Every figure comes from an official source — USITC for the schedule, USTR for Section 301, Commerce for AD/CVD cases, DHS for the UFLPA list, CBP for the rest — and where the official data doesn't answer the question, the site says so instead of guessing. The free tier watches one code × origin pair with an email alert when anything in its stack changes; the paid tier watches 25. The point of the watchlist isn't the lookup — it's that tariffs change while you're not looking, and the first time you hear about it shouldn't be the broker's invoice.&lt;/p&gt;

&lt;p&gt;If you import anything, or you build tools that model other people's rules: how do you handle a number that is really four different numbers wearing one label? That's where these systems keep their secrets.&lt;/p&gt;

&lt;h2&gt;
  
  
  Data sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The lookup and duty stack: &lt;a href="https://htsradar.com/" rel="noopener noreferrer"&gt;https://htsradar.com/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;The US tariff schedule (USITC): &lt;a href="https://hts.usitc.gov/" rel="noopener noreferrer"&gt;https://hts.usitc.gov/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Section 301 actions (USTR): &lt;a href="https://ustr.gov/issue-areas/enforcement/section-301-investigations" rel="noopener noreferrer"&gt;https://ustr.gov/issue-areas/enforcement/section-301-investigations&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>sideprojects</category>
      <category>data</category>
    </item>
    <item>
      <title>My Earthquake Site Said 8 Quakes in 24 Hours. There Were 3.</title>
      <dc:creator>ke ja</dc:creator>
      <pubDate>Thu, 05 Nov 2026 00:12:45 +0000</pubDate>
      <link>https://dev.to/ke_ja_6b55/my-earthquake-site-said-8-quakes-in-24-hours-there-were-3-399</link>
      <guid>https://dev.to/ke_ja_6b55/my-earthquake-site-said-8-quakes-in-24-hours-there-were-3-399</guid>
      <description>&lt;p&gt;`I built &lt;a href="https://diditshake.com/" rel="noopener noreferrer"&gt;DidItShake&lt;/a&gt; to answer the question people actually type after the ground moves: &lt;em&gt;did it shake near me — and how often does this happen here?&lt;/em&gt; It's a static site generated from the USGS earthquake catalog: 150,880 events in a local SQLite database, matched against 17,343 US towns, producing a page for each of the 6,124 towns that have real seismic history within 100 km — recent quakes in local time, the biggest on record since 1980, and how busy the last year has been compared with the previous decade.&lt;/p&gt;

&lt;p&gt;The data pipeline behaved. The bugs were all in how I &lt;em&gt;counted&lt;/em&gt; — and every one of them shipped a confident, wrong number to a page that looked completely finished. These are the four that taught me the most.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. The frozen clock
&lt;/h2&gt;

&lt;p&gt;During development I pinned the build's notion of "now" to a constant, so test builds would be reproducible:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;/code&gt;&lt;code&gt;python&lt;br&gt;
NOW = datetime(2026, 11, 3, 0, 0, tzinfo=timezone.utc)  # "just for testing"&lt;br&gt;
&lt;/code&gt;&lt;code&gt;&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You already know how this ends. The constant survived into the real build. Every windowed count on every city page — last 24 hours, 7 days, 30 days, the 90-day map, the activity rate — was computed as of midnight on the pinned day, while the "latest earthquakes" list came from the live feed. Two clocks, one page.&lt;/p&gt;

&lt;p&gt;San Francisco's page said &lt;strong&gt;8 earthquakes in the last 24 hours&lt;/strong&gt;. The real number was &lt;strong&gt;3&lt;/strong&gt;. The 8 wasn't random: it was the count for a full UTC day two days earlier, which is exactly the kind of plausible-looking wrong answer that nobody questions.&lt;/p&gt;

&lt;p&gt;The fix is one line (use the actual build time), but the detection is the lesson: I only caught it by picking one number off one finished page and re-deriving it from the raw source with the same filters. Which leads directly to bug number two — mine, in the checker.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. My verification query was wrong, not the site
&lt;/h2&gt;

&lt;p&gt;Re-counting San Francisco's 30-day and 365-day totals independently, I got 48 and 804. The site said 45 and 774. Tense moment — until I found the difference: 30 events in the catalog near San Francisco are &lt;strong&gt;quarry blasts&lt;/strong&gt;, which USGS records alongside earthquakes with &lt;code&gt;type='quarry blast'&lt;/code&gt;. The site correctly filtered to &lt;code&gt;type='earthquake'&lt;/code&gt;. My "independent" recount hadn't.&lt;/p&gt;

&lt;p&gt;A verification that doesn't carry &lt;em&gt;every&lt;/em&gt; filter of the original query — event type, magnitude floor, radius, time window, anchor point — doesn't verify anything. It just manufactures a second, different wrong number and a false alarm. When the filters matched exactly, everything agreed to the event: 24 h = 3, 7 d = 22, 30 d = 45, 365 d = 774, and spot checks in other cities (Los Angeles: 198 decade-count events in my database, 198 in a fresh catalog query) matched too.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Two honest numbers can still contradict each other on one page
&lt;/h2&gt;

&lt;p&gt;San Francisco's yearly chart used a &lt;em&gt;rolling&lt;/em&gt; 10-year window. Its activity-rate baseline — "the last 12 months vs. the 2016–2025 average of 12.9 per year" — used &lt;em&gt;calendar&lt;/em&gt; years. Both were computed correctly. But the rolling window silently ate most of 2016, so the chart's 2016 bar didn't add up to the printed average, and to any reader who checked, the site simply looked like it couldn't count.&lt;/p&gt;

&lt;p&gt;Same family of bug, twice more: the map originally drew the top 5 historic quakes while the table listed the top 8; and one event that belonged to both "last 90 days" and "historic top 8" got painted with the recent colour, so the map showed one fewer historic marker than the table had rows.&lt;/p&gt;

&lt;p&gt;The rule I now build by: &lt;strong&gt;everything on a page that comes from the same dataset is cut from one slice&lt;/strong&gt; — one window definition, one filtered list, shared by the chart, the map, the badges and the text. Not five queries that happen to be similar.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. So I made the build check its own arithmetic
&lt;/h2&gt;

&lt;p&gt;Checking pages by eye doesn't scale to 6,124 of them, so the build now ends with an automated audit: 128 sampled cities (every large metro in the launch set plus a random spread) × 11 checks = 1,408 assertions. Page KPIs against the database, the badge rate against its printed derivation, distribution totals against the 365-day count, historic table rows against map markers, structure and JSON-LD. The hourly rebuild runs fetch → rebuild → audit → deploy, and &lt;strong&gt;a failed audit blocks the deploy&lt;/strong&gt;; the old version just stays live.&lt;/p&gt;

&lt;p&gt;The audit earned its keep on its first run: it caught the Albuquerque map/table mismatch from bug #3, which had survived two rounds of human review. (Its four other "failures" that day were bugs in my test expectations — cities with zero small quakes in a year legitimately render no distribution module. The checker needs checking too, see bug #2.)&lt;/p&gt;

&lt;h2&gt;
  
  
  The shape of the thing
&lt;/h2&gt;

&lt;p&gt;For the curious: Python build scripts, SQLite as the only database, zero runtime queries to USGS — the catalog is sliced locally by magnitude and era (last year at M1.5+, last decade at M3.0+, historic layers back to 1976), everything pre-rendered to static HTML on Cloudflare Pages, city pages around 30 KB including their map data. Times are stored in UTC and rendered in &lt;em&gt;each town's own timezone&lt;/em&gt;, which sounds trivial until you remember the entire point of the page is "that shake woke me at 11:38 pm", not "07:38 UTC".&lt;/p&gt;

&lt;p&gt;Only 400 of the 6,124 city pages are in the launch sitemap. The rest exist, staged in per-state sitemaps, and get released in steps while I watch how the first batch gets crawled and indexed. Generating pages is the easy part; earning their way into the index is the actual product problem.&lt;/p&gt;

&lt;h2&gt;
  
  
  Data sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The site: &lt;a href="https://diditshake.com/" rel="noopener noreferrer"&gt;https://diditshake.com/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;A city page, with the pace rate, biggest-on-record and local times: &lt;a href="https://diditshake.com/ca/san-francisco/" rel="noopener noreferrer"&gt;https://diditshake.com/ca/san-francisco/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;How every number is defined, including what the catalog can't tell you: &lt;a href="https://diditshake.com/methodology/" rel="noopener noreferrer"&gt;https://diditshake.com/methodology/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Original data: USGS Earthquake Catalog (ComCat): &lt;a href="https://earthquake.usgs.gov/earthquakes/search/" rel="noopener noreferrer"&gt;https://earthquake.usgs.gov/earthquakes/search/&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you publish numbers derived from someone else's dataset, I'd like to hear how you verify them — especially the failures. Mine all passed code review. They failed arithmetic review.&lt;br&gt;
`&lt;/p&gt;

</description>
      <category>python</category>
      <category>webdev</category>
      <category>data</category>
      <category>sideprojects</category>
    </item>
    <item>
      <title>The £100k Tax Trap and Other Joys: Building One Take-Home Pay Engine for Four Countries</title>
      <dc:creator>ke ja</dc:creator>
      <pubDate>Wed, 04 Nov 2026 01:09:20 +0000</pubDate>
      <link>https://dev.to/ke_ja_6b55/the-ps100k-tax-trap-and-other-joys-building-one-take-home-pay-engine-for-four-countries-2bp0</link>
      <guid>https://dev.to/ke_ja_6b55/the-ps100k-tax-trap-and-other-joys-building-one-take-home-pay-engine-for-four-countries-2bp0</guid>
      <description>&lt;p&gt;Every extra £100 in that band is taxed at 40% (£40), and it also destroys £50 of allowance, which gets taxed at 40% too (£20) — plus 2% National Insurance. £62 gone from £100, from a system whose headline rates say 40%. Modelling this is three lines of code; &lt;em&gt;discovering&lt;/em&gt; it requires reading the allowance rules instead of the rate table. Scotland, meanwhile, runs six bands of its own (19% to 48%) on the same payslip infrastructure, so "UK tax" is really two engines wearing one coat. On £100,000 in England the full result: £27,432 income tax, £4,011 NI, £68,557 take-home.&lt;/p&gt;

&lt;h2&gt;
  
  
  Australia: the debt repayment that isn't a tax
&lt;/h2&gt;

&lt;p&gt;Australia layers three different things on top of income tax. The Medicare levy is a flat 2% — easy. The LITO is a low-income offset that phases out — fiddly but fine. The genuinely strange one is HELP (student debt) repayment: it's collected through payroll like a tax, it's calculated on "repayment income", and since the 2025-26 reform it's &lt;em&gt;marginal&lt;/em&gt; — you pay a percentage only on the slice above the threshold, with the rate stepping up across bands. Model it as a percentage of total income, the way it worked for decades, and every payslip with a student debt is wrong.&lt;/p&gt;

&lt;p&gt;On $100,000 with no HELP debt: $20,520 tax, $2,000 Medicare levy, $77,480 take-home — and $12,000 of employer superannuation that sits &lt;em&gt;on top&lt;/em&gt; of the salary and must never be deducted from it, a mistake roughly half the home-grown spreadsheets I found seem to make.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ireland: the rate that changes mid-year
&lt;/h2&gt;

&lt;p&gt;Ireland stacks income tax (with credits, not allowances — a different shape again), USC (a separate surcharge with its own bands), and PRSI. PRSI is the fun one: the employee rate changes &lt;em&gt;during&lt;/em&gt; the tax year, so the engine can't store a single annual rate — it has to annualise a part-year rate change and apply the blend. There's also a new auto-enrolment pension (My Future Fund) landing in the same payslip. On €50,000, single with standard credits: €39,648 take-home after €3,200 net income tax, €1,033 USC and €2,119 PRSI.&lt;/p&gt;

&lt;h2&gt;
  
  
  New Zealand: the levy priced per hundred dollars
&lt;/h2&gt;

&lt;p&gt;New Zealand is the cleanest — PAYE bands, no credits maze — except for the ACC levy, an accident-insurance charge priced per $100 of liable earnings up to a cap, which means it's a rate with a ceiling baked into its definition. On NZ$100,000: $22,878 tax, $1,750 ACC, $75,373 take-home before KiwiSaver enters the picture.&lt;/p&gt;

&lt;h2&gt;
  
  
  The rule that held across all four
&lt;/h2&gt;

&lt;p&gt;Every parameter in these engines was verified against the official source (GOV.UK, the ATO, Revenue Ireland, Inland Revenue) before it was coded — and where an official figure didn't exist yet, the feature didn't ship. Australia's 2026-27 redundancy tax-free amounts weren't published when I built the site, so there is no redundancy calculator. An empty slot in the nav is a better product than a confident wrong number.&lt;/p&gt;

&lt;p&gt;The engines are plain JavaScript, no dependencies, each with a test file of hand-computed cases including the boundary salaries — £100,000 on the taper edge, the exact dollar where a HELP band steps up. If you maintain anything that models other people's rules, I'd like to hear how you test the edges. That's where these systems keep their secrets.&lt;/p&gt;

&lt;h2&gt;
  
  
  Data sources
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;The calculators: &lt;a href="https://aftertaxly.com/" rel="noopener noreferrer"&gt;https://aftertaxly.com/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;How each country is calculated, with sources per figure: &lt;a href="https://aftertaxly.com/uk/how-we-calculate/" rel="noopener noreferrer"&gt;https://aftertaxly.com/uk/how-we-calculate/&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Official UK rates and thresholds (GOV.UK): &lt;a href="https://www.gov.uk/income-tax-rates" rel="noopener noreferrer"&gt;https://www.gov.uk/income-tax-rates&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>buildinpublic</category>
      <category>softwaredevelopment</category>
      <category>startup</category>
    </item>
    <item>
      <title>The US Government Shutdown Deleted a Month of Inflation Data — Notes From Building a CPI Calculator</title>
      <dc:creator>ke ja</dc:creator>
      <pubDate>Tue, 03 Nov 2026 01:05:25 +0000</pubDate>
      <link>https://dev.to/ke_ja_6b55/the-us-government-shutdown-deleted-a-month-of-inflation-data-notes-from-building-a-cpi-calculator-b79</link>
      <guid>https://dev.to/ke_ja_6b55/the-us-government-shutdown-deleted-a-month-of-inflation-data-notes-from-building-a-cpi-calculator-b79</guid>
      <description>&lt;p&gt;I run &lt;a href="https://inflationrecord.com/" rel="noopener noreferrer"&gt;Inflation Record&lt;/a&gt;, a small static site that turns the US Consumer Price Index into calculators: what $100 in 1913 is worth today ($3,361.64, if you're curious), what a 2020 salary needs to be now, that kind of thing. The whole site is generated at build time from one BLS series — CPI-U, CUUR0000SA0, monthly values from January 1913 onward.&lt;br&gt;
Building it was mostly uneventful. Then the data itself started doing interesting things. These are the four problems I actually had to solve, in the order I hit them.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;A month of official data simply doesn't exist
There is no CPI value for October 2025. The BLS didn't publish one during the federal government shutdown, and no official value exists — not "delayed", not "estimated". Gone.
My pipeline computes annual averages as the mean of the 12 monthly values. For 2025 it produced a number anyway, because code does what you tell it to:
function annualAverage(months) {
const present = months.filter(m =&amp;gt; m.value != null);
return present.reduce((a, m) =&amp;gt; a + m.value, 0) / present.length;
}
The bug isn't the code, it's the silence. An 11-month mean (321.943 for 2025) is a legitimate statistic, but only if the page says that's what it is. The fix was mostly editorial, enforced in the build:
Track monthsPresent next to every annual average.
If it's under 12, the year page renders a visible note: which month is missing and why.
Never interpolate. A calculator that quietly invents an official statistic is worse than one with a hole in it.
The same applies in miniature to the current year: the 2026 average (332.243) covers January to September. In the by-year table it now sits there labelled "(partial year)" instead of pretending to be a finished year.&lt;/li&gt;
&lt;li&gt;JavaScript floats will embarrass you in production HTML
My year pages ship their dataset to the browser as a JSON payload in the page. For months, anyone viewing source could read annual averages like this:
1913: 9.883333333333335
2026: 332.24255555555555
Perfectly accurate, completely unprofessional. The CPI is published to three decimal places; my averages should be too. The fix is one rounding step at serialization time in the build — not in the display layer, where it would only paint over the payload:
const round3 = n =&amp;gt; Math.round(n * 1000) / 1000;
const annualData = Object.fromEntries(
Object.entries(annualAverages).map(([y, v]) =&amp;gt; [y, round3(v)])
);
Lesson I keep re-learning: whatever you serialize is a public interface, even if it's "just" view-source.&lt;/li&gt;
&lt;li&gt;If the answer needs JS to exist, it doesn't exist
Each calculator page originally rendered its default result with JavaScript on load. Humans saw an answer; crawlers saw an empty box. For a site whose entire distribution strategy is search, that's a self-own.
Now the build pre-renders the default result into the HTML — same wording, same numbers the script would produce — and the JS takes over from there when the visitor changes an input:
// build time: compute the default exactly the way the page's script does
const def = convert({ amount: 100, from: 1913, to: 2026 });
html = html.replace("&amp;lt;!--RESULT--&amp;gt;", renderResult(def));
The discipline this imposes is the valuable part: the static text and the script's output must agree to the cent, which means one shared calculation function and a build check that compares them.&lt;/li&gt;
&lt;li&gt;One series, four countries, zero frameworks
The stack, for the curious: a Node build script, no framework, no database at runtime. Monthly series for the US, Canada, Australia and the UK are baked into 366 static pages (year pages, calculators, data tables), deployed to Cloudflare Pages, with an IndexNow push after each deploy so new pages get discovered quickly. Australia was the awkward one — its CPI history is three different products stitched across a century (quarterly, then a monthly "indicator", then full monthly CPI), and the build keeps those segments explicitly separate rather than smoothing them into a fake continuous line.
Total moving parts: a fetch script, a build script, and the discipline to label every hole in the data instead of filling it.
Data sources
The site: &lt;a href="https://inflationrecord.com/" rel="noopener noreferrer"&gt;https://inflationrecord.com/&lt;/a&gt;
Method, series IDs and the missing-month policy: &lt;a href="https://inflationrecord.com/methodology/" rel="noopener noreferrer"&gt;https://inflationrecord.com/methodology/&lt;/a&gt;
Original data: U.S. Bureau of Labor Statistics, CPI-U (series CUUR0000SA0): &lt;a href="https://data.bls.gov/timeseries/CUUR0000SA0" rel="noopener noreferrer"&gt;https://data.bls.gov/timeseries/CUUR0000SA0&lt;/a&gt;
If you've built on top of government statistics, I'd genuinely like to hear how you handle revisions and gaps — the missing month can't be the strangest thing out there.&lt;/li&gt;
&lt;/ol&gt;

</description>
      <category>buildinpublic</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
