<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Bohua Wang]]></title><description><![CDATA[Bohua Wang]]></description><link>https://bohua.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Fri, 04 Dec 2026 21:21:56 GMT</lastBuildDate><atom:link href="https://bohua.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Modeling Doyle, Scribner Decimal C, and International 1/4-Inch Log Rules in a Static Web App]]></title><description><![CDATA[When estimating lumber yield from sawlogs rather than milled boards, the standard T × W × L ÷ 12 formula no longer applies. Sawyers and timber buyers rely…]]></description><link>https://bohua.hashnode.dev/modeling-doyle-scribner-decimal-c-and-international-1-4-inch-log-rules-in-a-static-web-app</link><guid isPermaLink="true">https://bohua.hashnode.dev/modeling-doyle-scribner-decimal-c-and-international-1-4-inch-log-rules-in-a-static-web-app</guid><dc:creator><![CDATA[bohua]]></dc:creator><pubDate>Sun, 29 Nov 2026 08:07:38 GMT</pubDate><content:encoded><![CDATA[<p>When estimating lumber yield from sawlogs rather than milled boards, the standard <code>T × W × L ÷ 12</code> formula no longer applies. Sawyers and timber buyers rely on log rules—empirical or geometric formulas that predict how many board feet of 1-inch lumber can be sawn from a log given its small-end diameter inside bark (<code>D</code>, in inches) and length (<code>L</code>, in feet).</p>
<p>While building the <a href="https://woodlayoutcalc.com/log-board-foot-calculator/">Log Board Foot Calculator</a> for <a href="https://woodlayoutcalc.com/">WoodLayoutCalc</a>, I needed all three North American standards—<strong>Doyle</strong>, <strong>Scribner Decimal C</strong>, and <strong>International 1/4-inch</strong>—to run side by side in pure client-side TypeScript.</p>
<h2>Why the three rules diverge so sharply</h2>
<p>On a 12-inch diameter, 16-foot log, the three rules produce noticeably different numbers:</p>
<ul>
<li><strong>Doyle</strong> penalizes small diameters heavily (<code>((12 - 4) / 4)^2 * 16 = 64 BF</code>).</li>
<li><strong>Scribner Decimal C</strong> gives ~`80 BF<code>(index</code>8`).</li>
<li><strong>International 1/4"</strong> accounts for taper and kerf (<code>~97 BF</code>).</li>
</ul>
<p>Putting all three formulas in one comparison view makes those trade-offs obvious before anyone prices a log by the MBF (thousand board feet).</p>
<h2>Implementing the three rules in TypeScript</h2>
<h3>1. Doyle Log Rule</h3>
<p>Doyle deducts 4 inches from the small-end diameter for slabbing and sawdust, then squares a quarter of the remainder:</p>
<pre><code class="language-ts">export function doyle(dIn: number, lFt: number): number {
  if (!(dIn &gt; 4) || !(lFt &gt; 0)) return 0;
  return ((dIn - 4) / 4) ** 2 * lFt;
}
</code></pre>
<p>Any diameter at or below 4 inches returns <code>0</code>.</p>
<h3>2. Scribner and Scribner Decimal C</h3>
<p>Scribner originated as a diagram-based rule. In software, the standard polynomial approximation is:</p>
<pre><code class="language-ts">export function scribner(dIn: number, lFt: number): number {
  if (!(dIn &gt; 0) || !(lFt &gt; 0)) return 0;
  return Math.max(0.79 * dIn * dIn - 2 * dIn - 4, 0) * (lFt / 16);
}

export function scribnerDecimalC(dIn: number, lFt: number): number {
  return Math.round(scribner(dIn, lFt) / 10);
}
</code></pre>
<p>Because Scribner Decimal C rounds to the nearest 10 board feet and drops the trailing zero (so <code>64 BF</code> becomes <code>6</code>), it is helpful to display both the Decimal C index and the implied board-foot figure, along with a note that official diagram tables can vary by roughly <code>±10 BF</code>.</p>
<h3>3. International 1/4-Inch Log Rule</h3>
<p>The International 1/4-inch rule models a log in 4-foot cylinders, adding a <code>0.5"</code> taper per 4-foot segment from the small end toward the butt end:</p>
<pre><code class="language-ts">export function internationalQuarter(dIn: number, lFt: number): number {
  if (!(dIn &gt; 0) || !(lFt &gt; 0)) return 0;
  let total = 0;
  let remaining = lFt;
  let d = dIn;
  while (remaining &gt; 0) {
    const seg = Math.min(4, remaining);
    total += Math.max(0.22 * d * d - 0.71 * d, 0) * (seg / 4);
    remaining -= seg;
    d += 0.5;
  }
  return total * 0.905;
}
</code></pre>
<p>Handling partial tail segments (<code>seg = Math.min(4, remaining)</code>) keeps odd lengths like 10 ft or 14 ft accurate without hardcoding a massive lookup table.</p>
<h2>Static export and URL-shareable state</h2>
<p>Because all calculations are pure functions with zero server dependencies, the entire app exports as static HTML/JS and runs offline once loaded. You can try the side-by-side log scale comparison and 8"–40" charts on <a href="https://woodlayoutcalc.com/log-board-foot-calculator/">WoodLayoutCalc's Log Board Foot Calculator</a> or use the main <a href="https://woodlayoutcalc.com/">multi-row board foot calculator</a>.</p>
]]></content:encoded></item><item><title><![CDATA[Why I Built a 37-Rule Writing + 20-Rule Tailwind Linter Instead of Another AI Detector]]></title><description><![CDATA[Black-box AI percentage scores misfire on clear technical writing. Deterministic linting catches the exact clichés and UI tells locally in the browser.]]></description><link>https://bohua.hashnode.dev/why-i-built-a-37-rule-writing-20-rule-tailwind-linter-instead-of-another-ai-detector</link><guid isPermaLink="true">https://bohua.hashnode.dev/why-i-built-a-37-rule-writing-20-rule-tailwind-linter-instead-of-another-ai-detector</guid><category><![CDATA[Developer Tools]]></category><category><![CDATA[webdev]]></category><category><![CDATA[Tailwind CSS]]></category><category><![CDATA[AI]]></category><category><![CDATA[Productivity]]></category><dc:creator><![CDATA[bohua]]></dc:creator><pubDate>Thu, 26 Nov 2026 02:10:21 GMT</pubDate><content:encoded><![CDATA[<p>Most "AI detectors" give you a single opaque percentage like <em>74% AI-generated</em> without telling you what to fix. Worse, they regularly flag crisp human technical documentation as machine-written, while "AI humanizers" paraphrase sentences aggressively and break factual accuracy.</p>
<p>When reviewing my own LLM-assisted drafts and frontend PRs, I realized I did not want a probability guess. I wanted a <strong>strict linter</strong>, just like ESLint, except for prose clichés and generic Tailwind UI habits.</p>
<p>That led to building <strong><a href="https://unslopskill.com/">UnslopSkill</a></strong>, a zero-backend static Next.js toolkit that runs completely inside the browser.</p>
<h2>Problem 1: The Same 37 Writing Crutches Keep Returning</h2>
<p>Even strong coding models fall back on predictable verbal tics when drafting docs, changelogs, or work emails:</p>
<ul>
<li><strong>Overused vocabulary:</strong> <code>delve</code>, <code>tapestry</code>, <code>testament to</code>, <code>leverage</code>, <code>empower</code>, <code>paramount</code>, <code>seamless</code>, <code>effortlessly</code>.</li>
<li><strong>Formulaic contrast frames:</strong> <em>"It's not just a tool, it's a..."</em>, <em>"Whether you're a solo founder or an enterprise team..."</em>, <em>"Here's the catch..."</em>.</li>
<li><strong>Throat-clearing openers &amp; punctuation tells:</strong> <em>"It is worth noting that"</em>, <em>"In today's digital age"</em>, <em>"At the end of the day"</em>, plus stacked em-dashes in every second sentence.</li>
</ul>
<p>In the <a href="https://unslopskill.com/ai-slop-detector/">AI Slop Detector</a>, every match highlights the exact character span, shows its rule ID (<code>T01</code>–<code>T37</code>), and separates two actions:</p>
<ol>
<li><strong>Safe deterministic Quick Clean:</strong> Strips obvious filler openers and hollow adverbs mechanically without touching numbers, product names, or technical claims.</li>
<li><strong>Targeted Strict Rewrite Prompt:</strong> Lists only the structural tropes still present in your draft so you can paste one short instruction back into Claude, ChatGPT, or Cursor.</li>
</ol>
<h2>Problem 2: Vibecoded Tailwind Components All Look Identical</h2>
<p>Text is only half the story. Ask an AI coding agent to scaffold a SaaS landing page and you see the same 20 visual clichés over and over:</p>
<ul>
<li>Purple-pink <code>bg-clip-text</code> hero gradients + <code>blur-3xl</code> glow orbs -&gt; replace with plain <code>#FFFFFF</code> / <code>#FAFAFA</code> surfaces, <code>#171717</code> text, and 1px <code>#EBEBEB</code> borders.</li>
<li>Decorative <code>animate-ping</code> status dots + emoji prefixes on every badge -&gt; replace with plain typography and one clear primary CTA per screen.</li>
<li>Oversized <code>py-36</code> heroes + glassmorphic <code>hover:scale-105</code> cards -&gt; replace with a compact header so the working tool and primary CTA fit above <code>768px</code> on standard laptop screens.</li>
</ul>
<p>The <a href="https://unslopskill.com/ui-slop-auditor/">UI Slop Auditor</a> parses pasted HTML, React JSX, and Tailwind classes locally, prints exact line numbers for all 20 rules (<code>U01</code>–<code>U20</code>), and builds a refactor prompt for <strong>Swiss Monochrome</strong>, <strong>Editorial Workbench</strong>, or <strong>Studio Minimal</strong>.</p>
<h2>Problem 3: Fixing It Once Per Repo Instead of Every Prompt</h2>
<p>Linting after the fact is useful, but stopping the slop at generation time saves more effort.</p>
<p>That is why I paired the browser workbench with a <a href="https://unslopskill.com/skill-generator/">Custom <code>SKILL.md</code> Generator</a>, an open-source MIT rule repo (<a href="https://github.com/bohua2942/unslop-skill"><code>bohua2942/unslop-skill</code></a>), and a step-by-step <a href="https://unslopskill.com/how-to-install-unslop-skill/">Unslop Skill Install Guide</a>. You pick your coding agent (<strong>Claude Code</strong>, <strong>Cursor</strong> <code>.cursor/rules/unslop.mdc</code>, <strong>Codex</strong>, or <strong>Antigravity</strong>), toggle the exact rule modules and custom banned words you care about, and drop the file straight into your repository.</p>
<h2>Architecture Notes (<code>$0</code> Server Cost)</h2>
<ul>
<li><strong>Static export (<code>output: 'export'</code>):</strong> Hosted on Cloudflare Pages with zero runtime API costs.</li>
<li><strong>Privacy by design:</strong> Every text scan, UI regex pass, and Markdown export runs locally in TypeScript inside the browser. Nothing leaves your machine.</li>
<li><strong>Transparent rules:</strong> All 37 writing rules and 20 UI rules are documented directly on the site so users can inspect or challenge every rule.</li>
</ul>
<p>If you test <a href="https://unslopskill.com/">UnslopSkill</a> on a real draft or React component and hit a false positive, or have a pet-peeve AI pattern missing from the 57 checks, let me know in the comments or via <code>feedback@unslopskill.com</code>.</p>
]]></content:encoded></item></channel></rss>