<?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[Tidy Cents Engineering]]></title><description><![CDATA[Tidy Cents Engineering]]></description><link>https://tidycents.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Mon, 16 Nov 2026 23:20:12 GMT</lastBuildDate><atom:link href="https://tidycents.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Chargeback deadlines are a sorting problem]]></title><description><![CDATA[Disclosure: I work on Tidy Cents, the tool mentioned at the end. A customer disputes a $240 order as "not received". The bank pulls the money back, the…]]></description><link>https://tidycents.hashnode.dev/chargeback-deadlines-are-a-sorting-problem</link><guid isPermaLink="true">https://tidycents.hashnode.dev/chargeback-deadlines-are-a-sorting-problem</guid><category><![CDATA[JavaScript]]></category><category><![CDATA[ecommerce]]></category><category><![CDATA[Productivity]]></category><dc:creator><![CDATA[Tidy Cents]]></dc:creator><pubDate>Mon, 16 Nov 2026 07:23:12 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6af77e639fee0c62dd418bb0/e2d69160-c323-4561-a267-0bd83b68871a.jpg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em>Disclosure: I work on Tidy Cents, the tool mentioned at the end.</em></p>
<p>A customer disputes a $240 order as "not received". The bank pulls the money back, the processor adds a dispute fee, and the goods are already gone. Whether you get the money back depends mostly on one thing: a complete, readable evidence pack sent before the response deadline your processor gives you.</p>
<p>Sellers rarely lose because they had no proof. They lose because the proof was in four places and the deadline passed.</p>
<h2>Treat each dispute as a record with a date</h2>
<pre><code class="language-js">const disputes = [
  { id: "D-1042", amountCents: 24000, openedOn: "2026-11-02", respondByDays: 10,
    evidence: { order: true, tracking: true, delivery: false, messages: true } },
  { id: "D-1047", amountCents: 8900, openedOn: "2026-11-09", respondByDays: 10,
    evidence: { order: true, tracking: false, delivery: false, messages: false } },
];

const DAY = 86_400_000;
const today = new Date("2026-11-10");
const rows = disputes.map((d) =&gt; {
  const due = new Date(Date.parse(d.openedOn) + d.respondByDays * DAY);
  const missing = Object.entries(d.evidence).filter(([, ok]) =&gt; !ok).map(([k]) =&gt; k);
  return { id: d.id, daysLeft: Math.ceil((due - today) / DAY), missing };
}).sort((a, b) =&gt; a.daysLeft - b.daysLeft);
</code></pre>
<p>Two rules make this list useful:</p>
<ol>
<li><strong>Sort by days left, not by amount.</strong> A small dispute you can still win beats a large one already past its date.</li>
<li><strong>Show what is missing, by name.</strong> "delivery" tells you to fetch the carrier's proof of delivery today.</li>
</ol>
<p>The response window is set by your processor and card network, so store it per dispute instead of hard-coding one number.</p>
<p>We built this into Chargeback Evidence Desk ($19, free demo): every order record, delivery proof and customer message in one file, deadlines tracked, missing items flagged. <a href="https://gettidycents.com/product/chargeback-evidence-desk">https://gettidycents.com/product/chargeback-evidence-desk</a></p>
<p>How do you track dispute deadlines today: email folders, a spreadsheet, or the processor dashboard?</p>
]]></content:encoded></item><item><title><![CDATA[The week a profitable job runs your account below zero]]></title><description><![CDATA[Disclosure: I work on Tidy Cents, the tool mentioned at the end. A job can be profitable and still empty your bank account halfway through. The check is a…]]></description><link>https://tidycents.hashnode.dev/the-week-a-profitable-job-runs-your-account-below-zero</link><guid isPermaLink="true">https://tidycents.hashnode.dev/the-week-a-profitable-job-runs-your-account-below-zero</guid><category><![CDATA[JavaScript]]></category><category><![CDATA[algorithms]]></category><category><![CDATA[finance]]></category><dc:creator><![CDATA[Tidy Cents]]></dc:creator><pubDate>Mon, 16 Nov 2026 07:22:10 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6af77e639fee0c62dd418bb0/2f51d3ac-3e10-4e42-8d07-2c83063d354b.jpg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em>Disclosure: I work on Tidy Cents, the tool mentioned at the end.</em></p>
<p>A job can be profitable and still empty your bank account halfway through. The check is a running minimum over dated cash movements.</p>
<h2>The example</h2>
<p>A $48,000 kitchen job. $18,000 of materials in week 1, $4,000 of labour every week for 5 weeks, a 30% deposit ($14,400) up front, the rest on completion. Profit on paper: $10,000. Cash in the bank: $15,000.</p>
<pre><code class="language-js">const moves = [
  { week: 1, cents: +1_440_000 },  // deposit
  { week: 1, cents: -1_800_000 },  // materials
  ...[1, 2, 3, 4, 5].map((w) =&gt; ({ week: w, cents: -400_000 })), // labour
  { week: 6, cents: +3_360_000 },  // balance on completion
];

let bal = 1_500_000, low = bal, lowWeek = 0;
for (const m of moves.sort((a, b) =&gt; a.week - b.week)) {
  bal += m.cents;
  if (bal &lt; low) { low = bal; lowWeek = m.week; }
}
</code></pre>
<p>Balance: $7,400 after week 1, $3,400 after week 2, <strong>−$600 in week 3</strong>, and the low point is −$8,600 in week 5.</p>
<h2>The deposit that fixes it</h2>
<p>A larger deposit lifts every later balance by the same amount. So the smallest safe deposit is the old deposit plus the gap: 14,400 + 8,600 = <strong>$23,000</strong>, about 48% of the job. Or stage the payments so money arrives before the labour does.</p>
<p>We built this check into Contractor Bid &amp; Job Control ($9.90, free demo): <a href="https://gettidycents.com/product/contractor-bid-job-control">https://gettidycents.com/product/contractor-bid-job-control</a></p>
<p>Do you check the lowest balance before you sign a job, or only the profit?</p>
]]></content:encoded></item><item><title><![CDATA[A minimum price you can test: three terms, integer cents]]></title><description><![CDATA[Disclosure: I work on Tidy Cents, the free calculator mentioned at the end. Most "minimum price" formulas stop at unit cost plus a share of fixed costs…]]></description><link>https://tidycents.hashnode.dev/a-minimum-price-you-can-test-three-terms-integer-cents</link><guid isPermaLink="true">https://tidycents.hashnode.dev/a-minimum-price-you-can-test-three-terms-integer-cents</guid><category><![CDATA[JavaScript]]></category><category><![CDATA[pricing]]></category><category><![CDATA[finance]]></category><dc:creator><![CDATA[Tidy Cents]]></dc:creator><pubDate>Mon, 16 Nov 2026 07:20:37 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6af77e639fee0c62dd418bb0/2dd9422c-8879-46cc-851f-f61c8c37900d.jpg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em>Disclosure: I work on Tidy Cents, the free calculator mentioned at the end.</em></p>
<p>Most "minimum price" formulas stop at unit cost plus a share of fixed costs. That misses the cost of waiting to be paid.</p>
<h2>The three terms</h2>
<pre><code>floor = unit_cost + fixed_cost_share + cost_of_waiting
cost_of_waiting = (unit_cost + fixed_cost_share) * annual_rate * days / 365
</code></pre>
<p>Example: unit cost $12, fixed costs $6,000 a month over 1,000 units ($6 a unit), paid 60 days later, money costs 12% a year.</p>
<ul>
<li>waiting: 18 × 0.12 × 60 / 365 = 0.355 → <strong>$0.36</strong></li>
<li>floor: 12 + 6 + 0.36 = <strong>$18.36</strong></li>
<li>price for a 25% margin on the price: 18.36 / (1 − 0.25) = <strong>$24.48</strong></li>
</ul>
<h2>Keep it in integer cents</h2>
<pre><code class="language-js">const toCents = (x) =&gt; Math.round(x * 100);
const unit = toCents(12), fixed = toCents(6);
const wait = Math.round((unit + fixed) * 0.12 * 60 / 365); // 36
const floor = unit + fixed + wait;                         // 1836
const price = Math.ceil(floor / (1 - 0.25));               // 2448
</code></pre>
<p>Round each step once, in one direction you can explain. <code>Math.ceil</code> on the price means you never quote a cent below your margin.</p>
<h2>Why it matters</h2>
<p>At $18.00 the sale looks break-even. At 60-day terms it quietly loses $0.36 a unit. On 1,000 units a month that is $360 you never see.</p>
<p>The same formula runs in our free Minimum Price Calculator, no sign-up, formulas shown: <a href="https://gettidycents.com/tools/minimum-price-calculator">https://gettidycents.com/tools/minimum-price-calculator</a></p>
<p>How do you price in the cost of slow payers today, if at all?</p>
]]></content:encoded></item><item><title><![CDATA[A price floor you can test: computing the minimum safe price in integer cents]]></title><description><![CDATA[A minimum price is not a feeling. It is a sum of four parts, and each part can be tested on its own. This is the model behind our free Minimum Price…]]></description><link>https://tidycents.hashnode.dev/a-price-floor-you-can-test-computing-the-minimum-safe-price-in-integer-cents</link><guid isPermaLink="true">https://tidycents.hashnode.dev/a-price-floor-you-can-test-computing-the-minimum-safe-price-in-integer-cents</guid><dc:creator><![CDATA[Tidy Cents]]></dc:creator><pubDate>Sun, 15 Nov 2026 19:31:20 GMT</pubDate><content:encoded><![CDATA[<p>A minimum price is not a feeling. It is a sum of four parts, and each part can be tested on its own. This is the model behind our free <a href="https://gettidycents.com/tools/minimum-price-calculator">Minimum Price Calculator</a>.</p>
<h2>The four parts</h2>
<ol>
<li><strong>Unit cost</strong>: materials, packaging, payment fees per unit.</li>
<li><strong>Share of fixed costs</strong>: monthly fixed costs divided by the units you really expect to sell.</li>
<li><strong>Cost of waiting to be paid</strong>: the money tied up for the payment term, at your borrowing rate.</li>
<li><strong>Target margin</strong>: applied on top of the floor, not inside it.</li>
</ol>
<h2>Rules we hold the code to</h2>
<ul>
<li>All money is integer cents; rates are integers in basis points.</li>
<li>Every rounding happens once, at a named step, half-up.</li>
<li>Golden test vectors pin known inputs to known outputs.</li>
<li>Boundary tests: zero volume, zero margin, very long terms.</li>
<li>Metamorphic tests: doubling every cost doubles the floor; raising volume never raises the fixed-cost share.</li>
</ul>
<h2>Example</h2>
<p>Unit cost $12.00, fixed costs $6,000 a month over 1,000 units ($6.00 each), and a 60-day term on $18.00 at 12% a year (about $0.36). Floor: $18.36. With a 25% margin on price, the price is $18.36 / 0.75 = $24.48.</p>
<p>Same inputs, same answer, every time, with the working shown. No AI guesses. Free, no sign-up: <a href="https://gettidycents.com/tools/minimum-price-calculator">gettidycents.com/tools/minimum-price-calculator</a></p>
]]></content:encoded></item></channel></rss>