<?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</title>
    <description>The most recent home feed on DEV Community.</description>
    <link>https://dev.to</link>
    <atom:link rel="self" type="application/rss+xml" href="https://cname.dev.to/feed"/>
    <language>en</language>
    <item>
      <title>Why a Churn Model’s Score Is Not the Same as a Retention Strategy</title>
      <dc:creator>Paul Adeniyi</dc:creator>
      <pubDate>Fri, 20 Nov 2026 10:13:00 +0000</pubDate>
      <link>https://dev.to/paulex/why-a-churn-models-score-is-not-the-same-as-a-retention-strategy-4i7j</link>
      <guid>https://dev.to/paulex/why-a-churn-models-score-is-not-the-same-as-a-retention-strategy-4i7j</guid>
      <description>&lt;p&gt;A churn model can help identify customers who may leave. It cannot, by itself, tell a company what to do next.&lt;/p&gt;

&lt;p&gt;That distinction is easy to miss. A model produces predictions from patterns in past data. A retention strategy involves choosing an action, deciding who should receive it and checking whether it actually helps.&lt;/p&gt;

&lt;p&gt;Treating those as the same problem can lead to expensive campaigns that reach the wrong customers or have no measurable effect.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prediction is not intervention
&lt;/h2&gt;

&lt;p&gt;Suppose a model assigns a customer a high churn probability. That tells us the customer resembles other customers who churned in the training data. It does not tell us why they might leave, whether they can be persuaded to stay or which offer would change their decision.&lt;/p&gt;

&lt;p&gt;A discount might retain some customers, but it could also reduce revenue from people who would have stayed anyway. A service call might be more useful for customers experiencing a support problem. The prediction alone does not distinguish between those situations.&lt;/p&gt;

&lt;p&gt;It is helpful to separate three questions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Who might churn?&lt;/strong&gt; A prediction task.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Why might they churn?&lt;/strong&gt; An investigation and analysis task.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Which action is likely to help?&lt;/strong&gt; An intervention and measurement task.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Each question needs different evidence.&lt;/p&gt;

&lt;h2&gt;
  
  
  Use model scores to prioritise investigation
&lt;/h2&gt;

&lt;p&gt;A churn score can help teams decide where to look first, especially when there are many customers. But scores should be interpreted in context.&lt;/p&gt;

&lt;p&gt;For example, a team might group customers into risk bands and review whether those groups differ in relevant ways, such as recent support interactions or changes in product usage. These patterns can suggest areas to investigate, but they do not prove that a particular factor caused churn.&lt;/p&gt;

&lt;p&gt;The model should support a workflow, not silently make decisions without review.&lt;/p&gt;

&lt;h2&gt;
  
  
  Test retention actions
&lt;/h2&gt;

&lt;p&gt;To find out whether an action works, compare outcomes for customers who receive it with an appropriate comparison group.&lt;/p&gt;

&lt;p&gt;One approach is a controlled experiment, where eligible customers are assigned to different groups according to a defined process. The team can then compare outcomes over a set period, while accounting for practical and ethical constraints.&lt;/p&gt;

&lt;p&gt;The important point is to measure the effect of the action, not just the model’s ability to identify risk.&lt;/p&gt;

&lt;p&gt;A basic evaluation plan should specify:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Which customers are eligible&lt;/li&gt;
&lt;li&gt;What action they will receive&lt;/li&gt;
&lt;li&gt;What the comparison group receives&lt;/li&gt;
&lt;li&gt;Which outcome will be measured&lt;/li&gt;
&lt;li&gt;How long the outcome period lasts&lt;/li&gt;
&lt;li&gt;What costs or customer impacts should also be tracked&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The exact design depends on the product and the decision being tested.&lt;/p&gt;

&lt;h2&gt;
  
  
  Account for the cost of acting
&lt;/h2&gt;

&lt;p&gt;A retention action has costs. These may include discounts, staff time, customer contact or the risk of annoying customers with unnecessary outreach.&lt;/p&gt;

&lt;p&gt;A useful decision process considers both the likelihood of churn and the likely value of an intervention. A high-risk customer may not be the best candidate for every offer. A lower-risk customer may respond well to a low-cost service improvement.&lt;/p&gt;

&lt;p&gt;This is one reason a single probability threshold rarely provides a complete retention policy. The decision should reflect the action, its cost and the expected outcome.&lt;/p&gt;

&lt;h2&gt;
  
  
  Monitor results after launch
&lt;/h2&gt;

&lt;p&gt;A retention campaign can change customer behaviour, so the model and the intervention should be reviewed over time. Teams can monitor whether the campaign reaches the intended customers, whether outcomes differ across groups and whether the results persist beyond the initial period.&lt;/p&gt;

&lt;p&gt;It is also important to check for unintended effects. For example, an offer designed to reduce cancellations might encourage customers to wait for discounts, or the outreach could create a poor experience for people who do not need it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep the claims proportional to the evidence
&lt;/h2&gt;

&lt;p&gt;A model can identify patterns associated with churn. An experiment can provide evidence about whether a particular intervention changed an outcome. Those are different kinds of evidence, and they support different claims.&lt;/p&gt;

&lt;p&gt;A responsible churn workflow uses predictions to focus attention, investigates the reasons behind risk and tests actions before treating them as effective. The model is one input to a retention strategy, not the strategy itself.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>productivity</category>
      <category>programming</category>
    </item>
    <item>
      <title>5 Companies Shaping Fintech Infrastructure: What Should Developers Take From Money20/20</title>
      <dc:creator>Phil</dc:creator>
      <pubDate>Fri, 20 Nov 2026 10:11:15 +0000</pubDate>
      <link>https://dev.to/phil_07/5-companies-shaping-fintech-infrastructure-what-should-developers-take-from-money2020-9k0</link>
      <guid>https://dev.to/phil_07/5-companies-shaping-fintech-infrastructure-what-should-developers-take-from-money2020-9k0</guid>
      <description>&lt;p&gt;A checkout provider accepts a payment request, but the app times out before it gets a response. An identity check returns an inconclusive result. An AI assistant can recommend a transaction, but the account holder has not authorized it. These are different situations, yet all three raise the same design question: which system owns the decision when the normal flow breaks?&lt;/p&gt;

&lt;p&gt;One theme from Money20/20 USA 2026 was that capabilities such as local payments, identity verification, and digital asset operations are increasingly available as specialist products. That gives teams more choices about what to integrate. It also leaves them responsible for the user experience across those integrations, especially when providers disagree or return an incomplete result. &lt;a href="https://geekyants.com/blog/where-fintech-is-heading-my-takeaways-from-money20-20-usa-2026?utm_source=dis2026" rel="noopener noreferrer"&gt;Money20/20 USA 2026 engineering takeaways&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Five companies, five parts of the stack
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;GeekyAnts&lt;/strong&gt; built PsyFi, a financial wellness app that checks AI-generated dollar amounts against users’ financial records. It shows how a product can test a specific claim against source data before relying on the output.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Stripe&lt;/strong&gt; supports regional checkout methods. The engineering question is how the application represents payment status when different methods settle on different timelines.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Plaid&lt;/strong&gt; provides identity verification and connections to financial accounts. An application still needs to decide what happens when verification is inconclusive or the user cannot connect an account.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Visa&lt;/strong&gt; documents tokenized credentials and consumer-approved purchase instructions for agentic commerce. That gives developers a concrete example of how a purchasing workflow can express what an agent has permission to do.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Circle&lt;/strong&gt; issues USDC, which illustrates how stablecoins can be used in global money movement. The product team still has to define how it records the transfer and reconciles it with its own ledger.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The integration work starts with the state model
&lt;/h2&gt;

&lt;p&gt;Consider a cross-border checkout that supports cards and a local bank payment method. The frontend may show the same confirmation screen for both, but the underlying payment states may differ. One provider might return an immediate confirmation while another leaves the transaction pending. If the network drops, the app needs to recover the existing transaction and check its status before attempting another charge.&lt;/p&gt;

&lt;p&gt;This is where an internal transaction ID and a clear state model earn their place. They give support, finance, and engineering a common reference when the customer sees a pending payment, the provider sends an update later, or reconciliation shows a mismatch. A useful integration test is to simulate a timeout immediately after the provider accepts the request and verify that the app resolves the original payment.&lt;/p&gt;

&lt;p&gt;Identity has a similar edge case. An inconclusive result needs a route through retry, manual review, or a different verification method, depending on the product. The application also needs to make clear what the customer can do while that result is pending. Those are product decisions that should be reflected in the API and UI.&lt;/p&gt;

&lt;h2&gt;
  
  
  AI needs a boundary between advice and action
&lt;/h2&gt;

&lt;p&gt;For a financial workflow, a recommendation and an authorized action are separate states. An agent might correctly identify an invoice and propose paying it. The execution step still needs to verify who approved the payment, what amount and recipient were authorized, and whether that approval remains valid.&lt;/p&gt;

&lt;p&gt;The same distinction makes AI evaluations easier to design. Document extraction can be tested against known fields. A financial assistant can be checked for unsupported amounts. An agent that initiates a transaction needs tests for missing approval, expired permissions, and duplicate execution. The conference recap also raises an important measurement question: whether the workflow still saves time once integration, monitoring, and human review are included.&lt;/p&gt;

&lt;p&gt;When a fintech workflow crosses multiple providers, where should responsibility for retries and exceptions live: in the provider integration, a shared orchestration layer, or the feature that owns the customer journey?&lt;/p&gt;

</description>
      <category>forum</category>
      <category>ai</category>
      <category>fintech</category>
      <category>architecture</category>
    </item>
    <item>
      <title>Two Calls Per Failure Is a Ceiling, Not a Quota</title>
      <dc:creator>Swipe Again</dc:creator>
      <pubDate>Fri, 20 Nov 2026 10:11:05 +0000</pubDate>
      <link>https://dev.to/swipeagain/two-calls-per-failure-is-a-ceiling-not-a-quota-3jep</link>
      <guid>https://dev.to/swipeagain/two-calls-per-failure-is-a-ceiling-not-a-quota-3jep</guid>
      <description>&lt;p&gt;Phone calls are the most expensive touch in payment recovery and the easiest to misuse. An email costs fractions of a cent and can be ignored politely. A call costs a person's time, interrupts a subscriber's day, and — handled badly — turns a routine card problem into a dispute. Handled well, it fixes in four minutes what a week of emails could not: the business account where your contact is not the person who pays, the high-value subscriber whose card was replaced and who never saw the notice, the payer who simply needed a human to say the deadline out loud.&lt;/p&gt;

&lt;p&gt;The discipline is in the rationing. Work the call queue by value and deadline, never by failure order: closest to the pause date first, highest plan value first inside that. Cap attempts at two per failure cycle — one genuine conversation attempt and, if it goes unanswered, one voicemail — then let email and text carry the case. Two is a ceiling, not a quota; a case that resolves after the first call does not need a second for symmetry, and a case that has had two does not get a third because someone feels uneasy.&lt;/p&gt;

&lt;p&gt;Scripts exist so that nobody improvises the hard sentences under pressure. The caller should never have to invent, mid-call, how to identify themselves, how to state the failure plainly without shaming anyone, what to offer when the answer is "money is tight this week," or how to accept a cancellation cleanly when that is the answer. Each situation has a branch, and each branch ends the same way: a confirmation email within the hour carrying whatever was agreed, because calls create intent and the email carries the link that converts it.&lt;/p&gt;

&lt;p&gt;The set I keep beside the phone is &lt;a href="https://swipeagain.com/pages/dunning-call-scripts" rel="noopener noreferrer"&gt;word-for-word dunning call scripts for live calls and voicemail&lt;/a&gt; — a live save call, a business accounts-payable call, and two voicemail drops, early and final, each written to be read as written.&lt;/p&gt;

&lt;p&gt;A few rules in those scripts are worth stealing even if you write your own. Never take a full card number by phone unless your process is genuinely set up for it; stay on the line while the subscriber uses the secure update page instead, and confirm the moment it saves. Never state an amount on a voicemail, because you cannot know who hears it. Never threaten a consequence you will not carry out, and never state a deadline that is not the real one — the final voicemail only works because the pause date in it is true. And when someone says they meant to cancel anyway, close it on the call, confirm what the outstanding payment covers, and stop selling. A clean exit protects the winback you might earn in six months; an argument converts a quiet cancellation into a chargeback.&lt;/p&gt;

&lt;p&gt;The business call deserves its own script because business failures are usually routing failures. The card belonged to someone who left, the purchase-order rule changed, accounts payable never received the invoice. The caller's job is not to collect; it is to find the payer, learn what that payer needs from you — a fresh invoice, a PO number on it, an update link sent to the actual cardholder — and leave with a named next step, an owner, and a date.&lt;/p&gt;

&lt;p&gt;Measure whether any of this is worth it. Compare the recovery on called accounts against what your automated sequence achieves alone, on comparable value bands. If calls are not beating automation, the queue criteria are wrong, not the scripts.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://swipeagain.com/" rel="noopener noreferrer"&gt;Swipe Again&lt;/a&gt; runs the automated side — decline-aware retries, branded emails and texts, card-update pages — at $179 a month flat, so a team's calling hours land only on the accounts that genuinely need a voice. Ration the calls, script the sentences, and log everything. The log, in the end, is what turns one saved account into a process.&lt;/p&gt;

</description>
      <category>operations</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Automating browser tabs without Selenium: keep them visible and local</title>
      <dc:creator>Francesco Ruffo</dc:creator>
      <pubDate>Fri, 20 Nov 2026 10:10:27 +0000</pubDate>
      <link>https://dev.to/francesco_ruffo_a6f64e0f6/automating-browser-tabs-without-selenium-keep-them-visible-and-local-1llb</link>
      <guid>https://dev.to/francesco_ruffo_a6f64e0f6/automating-browser-tabs-without-selenium-keep-them-visible-and-local-1llb</guid>
      <description>&lt;p&gt;Selenium, Playwright and Puppeteer are great tools. They were built for one job above all: driving a browser from the outside, usually headless, usually in CI. When you need to test a web app at scale, that is exactly what you want.&lt;/p&gt;

&lt;p&gt;But a lot of browser automation is not testing. It is the boring, repetitive work people do every day in their own browser: copying values from one back-office into another, opening the same five monitoring pages every morning, filling the same form for the tenth time, checking a status on a supplier's portal. For that kind of work, the classic stack feels wrong:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;a separate WebDriver process and often a separate browser profile, without the user's sessions;&lt;/li&gt;
&lt;li&gt;a script the user cannot see, running somewhere they do not control;&lt;/li&gt;
&lt;li&gt;often a server or a cloud service in the middle.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I wanted the opposite: automation that runs &lt;strong&gt;in the user's real browser, in tabs they can see and stop, only on sites they explicitly approved, with nothing leaving the machine&lt;/strong&gt;. That is what &lt;a href="https://remote-tab-opener.com/" rel="noopener noreferrer"&gt;Remote Tab Opener&lt;/a&gt; (RTO) does. This post explains the model and shows the minimal code.&lt;/p&gt;

&lt;h2&gt;
  
  
  The model: a trusted page, a local extension, an allow-list
&lt;/h2&gt;

&lt;p&gt;There are three pieces:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Your own web page.&lt;/strong&gt; It can be served from &lt;code&gt;localhost&lt;/code&gt; or any &lt;code&gt;https://&lt;/code&gt; origin you control. This is where your workflow lives: buttons, logic, UI.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The RTO browser extension&lt;/strong&gt; (Chrome or Firefox). It receives requests from your page through &lt;code&gt;window.postMessage&lt;/code&gt;, checks them, and acts on real tabs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;An explicit allow-list.&lt;/strong&gt; The extension is deny-by-default. A page cannot authorize itself: the user approves each host on a "master" tab, and the extension refuses everything else.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Your page talks to the extension, the extension talks to the tabs. No server, no proxy, no relay. The tabs are normal tabs in the user's window, with the user's existing sessions, and the user can watch, take over or close them at any time. An optional overlay cursor even shows where the automation is about to click.&lt;/p&gt;

&lt;p&gt;I wrote more about why visibility matters here: &lt;a href="https://remote-tab-opener.com/articles/visible-browser-tab-automation/" rel="noopener noreferrer"&gt;Visible browser tab automation: what it means in practice&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Minimal code
&lt;/h2&gt;

&lt;p&gt;With the extension installed, include the SDK Lite bundle (&lt;code&gt;RTO.min.js&lt;/code&gt;, MIT-licensed, &lt;a href="https://github.com/CodeVersonLab/rto-sdk-lite" rel="noopener noreferrer"&gt;on GitHub&lt;/a&gt;) and detect the extension first:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script&lt;/span&gt; &lt;span class="na"&gt;src&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"RTO.min.js"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
&lt;span class="nc"&gt;RTOconnectOnce&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;2000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;)&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="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;warn&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Remote Tab Opener extension not detected"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"RTO connected"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then ask the user to approve the host you want to work on. This is not a silent auto-allow: the request shows up on the master tab and the user decides.&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="nc"&gt;RTOAllowlist&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"example.com"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;130000&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ok&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="s2"&gt;"Approved"&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Cancelled by the user"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now open, or reuse, one controlled tab. The &lt;code&gt;tabKey&lt;/code&gt; is a stable name: calling &lt;code&gt;openTab&lt;/code&gt; again with the same key reuses the same tab instead of piling up new ones.&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="nc"&gt;RTOForm&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;openTab&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;tabKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"demo"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://example.com"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;focus&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;newTab&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;false&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;timeoutMs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;20000&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Controlled tab:"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tabId&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;From there you can run a small flow: open a page, wait for an element, read some values. Every message uses the same public bridge vocabulary:&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="nf"&gt;sendRto&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"flow.run"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;tabKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"demo-flow"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="n"&gt;steps&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="kd"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"openTab"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"https://example.com"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;tabKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"demo-flow"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="kd"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"dom.waitFor"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;selector&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"h1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;timeoutMs&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;15000&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="kd"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"dom.extract"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;fields&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;
      &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"heading"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;selector&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"h1"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;mode&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"text"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;)&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="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;ok&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="nb"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;error&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;(&lt;code&gt;sendRto&lt;/code&gt; is a ten-line &lt;code&gt;postMessage&lt;/code&gt; helper with a request id and a timeout; it is given in full in the &lt;a href="https://remote-tab-opener.com/documentation/ai-safe-quickstart.php" rel="noopener noreferrer"&gt;AI-safe quickstart&lt;/a&gt;.)&lt;/p&gt;

&lt;p&gt;The &lt;a href="https://github.com/CodeVersonLab/rto-sdk-lite" rel="noopener noreferrer"&gt;SDK Lite repository&lt;/a&gt; has three runnable examples: a minimal connection page, a visible cursor walkthrough and a complete local demo against a test form.&lt;/p&gt;

&lt;h2&gt;
  
  
  What RTO does not do
&lt;/h2&gt;

&lt;p&gt;The constraints are the point, so let me be explicit:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;It does not bypass the Same-Origin Policy.&lt;/strong&gt; Your page never gets direct access to another site's DOM; the extension performs documented actions and returns results.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It does not act on sites the user has not approved.&lt;/strong&gt; No allow-list entry, no action.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It is not a scraping farm.&lt;/strong&gt; One user, their own browser, their own sessions, visible tabs. If you need hundreds of headless browsers in parallel, use Playwright.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;It does not send your data anywhere.&lt;/strong&gt; No server, no cloud relay: requests go from your page to the extension and to the tab, all inside the browser.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Website owners who do not want to be automated at all can &lt;a href="https://remote-tab-opener.com/articles/rto-lock-website-automation-opt-out/" rel="noopener noreferrer"&gt;opt out&lt;/a&gt;. The full picture is in the &lt;a href="https://remote-tab-opener.com/documentation/security.php" rel="noopener noreferrer"&gt;security model&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  When to use what
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;You need…&lt;/th&gt;
&lt;th&gt;Use&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;End-to-end tests in CI, headless, at scale&lt;/td&gt;
&lt;td&gt;Playwright / Selenium / Puppeteer&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A one-off script you run yourself&lt;/td&gt;
&lt;td&gt;A userscript or the browser console&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A shared internal tool that drives real tabs in the user's browser, visibly, on approved sites&lt;/td&gt;
&lt;td&gt;RTO&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;A longer comparison is here: &lt;a href="https://remote-tab-opener.com/articles/rto-vs-selenium-playwright-puppeteer/" rel="noopener noreferrer"&gt;RTO vs Selenium, Playwright and Puppeteer&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Extension: &lt;a href="https://remote-tab-opener.com/chrome-tab-automation/" rel="noopener noreferrer"&gt;Chrome&lt;/a&gt; · &lt;a href="https://remote-tab-opener.com/firefox-tab-automation/" rel="noopener noreferrer"&gt;Firefox&lt;/a&gt; (free)&lt;/li&gt;
&lt;li&gt;SDK Lite and examples: &lt;a href="https://github.com/CodeVersonLab/rto-sdk-lite" rel="noopener noreferrer"&gt;github.com/CodeVersonLab/rto-sdk-lite&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Docs: &lt;a href="https://remote-tab-opener.com/documentation/" rel="noopener noreferrer"&gt;remote-tab-opener.com/documentation&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I built RTO, so I am obviously biased. I would really like feedback on the security model and on the use cases you would try it for. Comments are open.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>automation</category>
      <category>browserextension</category>
    </item>
    <item>
      <title>A signature field that still works when JavaScript doesn't</title>
      <dc:creator>Formgong</dc:creator>
      <pubDate>Fri, 20 Nov 2026 10:10:05 +0000</pubDate>
      <link>https://dev.to/formgongteam/a-signature-field-that-still-works-when-javascript-doesnt-2dn3</link>
      <guid>https://dev.to/formgongteam/a-signature-field-that-still-works-when-javascript-doesnt-2dn3</guid>
      <description>&lt;p&gt;Most "sign here" widgets are a canvas and nothing else. If the script fails to load, if someone uses a keyboard, or if a screen reader is involved, there is simply no way to sign. We needed a signature field for waivers and photo releases in Formgong, and we wanted it to fail the other way round: the plain HTML should already be a working signature, and the drawing pad should be a bonus on top.&lt;/p&gt;

&lt;p&gt;Here is how it ended up, including the one bug that every test missed and a real phone found in about two seconds.&lt;/p&gt;

&lt;h2&gt;
  
  
  The typed name is the signature
&lt;/h2&gt;

&lt;p&gt;In the US, the ESIGN Act says a signature can't be refused just because it is electronic, and it defines an electronic signature as a symbol "adopted by a person with the intent to sign". A typed full name next to an "I agree" tick box meets that. So the base field is boring on purpose:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;label&amp;gt;&lt;/span&gt;Signature: type your full name
  &lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"text"&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"signature"&lt;/span&gt; &lt;span class="na"&gt;required&lt;/span&gt; &lt;span class="na"&gt;autocomplete&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"name"&lt;/span&gt; &lt;span class="na"&gt;data-formgong-signature&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;required&lt;/code&gt; stops an empty submit with the browser's own message. &lt;code&gt;autocomplete="name"&lt;/code&gt; lets the phone fill it in. Nothing here needs JavaScript, and it works with a keyboard and a screen reader.&lt;/p&gt;

&lt;p&gt;The terms sit right above the tick box, in the same form, so nobody agrees to something they never had on screen:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"fg-terms"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&amp;lt;p&amp;gt;&lt;/span&gt;I understand the activity involves risk…&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;label&amp;gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"checkbox"&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"agree"&lt;/span&gt; &lt;span class="na"&gt;value&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"yes"&lt;/span&gt; &lt;span class="na"&gt;required&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt; I have read this and I agree to it&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The pad: a canvas that writes into a file input
&lt;/h2&gt;

&lt;p&gt;The pad only appears when the form can carry a file (&lt;code&gt;enctype="multipart/form-data"&lt;/code&gt;), because the drawing travels as a real upload, not as a base64 string stuffed into a text field. That keeps the server path identical to any other file: the same size limits, the same virus scan, the same link in the notification email.&lt;/p&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8q86m3ypm3k3hbigywgg.png" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8q86m3ypm3k3hbigywgg.png" alt="The signature field on a live form: the typed name, the drawing pad under its own heading, and a plain Clear button" width="800" height="523"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The trick is that a file input's &lt;code&gt;files&lt;/code&gt; can be replaced with a &lt;code&gt;DataTransfer&lt;/code&gt; list. After every stroke we turn the canvas into a PNG and drop it into a hidden input:&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;save&lt;/span&gt;&lt;span class="p"&gt;(&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="n"&gt;out&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;createElement&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"canvas"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;out&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;width&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;canvas&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;width&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;out&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;height&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;canvas&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;height&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;o&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;out&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getContext&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"2d"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fillStyle&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"#fff"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;              &lt;span class="c1"&gt;// a white background reads the same in every mail client&lt;/span&gt;
  &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fillRect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;out&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;width&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;out&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;height&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;drawImage&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;canvas&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&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="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;atob&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;out&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;toDataURL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"image/png"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;","&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&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="n"&gt;bytes&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;Uint8Array&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;length&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;bytes&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;charCodeAt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&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="n"&gt;list&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;DataTransfer&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;list&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;items&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;add&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nc"&gt;File&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;bytes&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"signature.png"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="kd"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"image/png"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;fileInput&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;files&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;list&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;files&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;      &lt;span class="c1"&gt;// fileInput.name = "signature_drawn"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Two details that matter more than they look:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Save on pointer-up, not on submit.&lt;/strong&gt; &lt;code&gt;canvas.toBlob&lt;/code&gt; is async, and you can't hold a submit event while you wait for it. Doing the work at the end of each stroke means the file input is always current when the form goes, whether it is a plain POST or someone's own &lt;code&gt;fetch(new FormData(form))&lt;/code&gt; handler.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scale for the screen.&lt;/strong&gt; The canvas is sized to &lt;code&gt;getBoundingClientRect() × devicePixelRatio&lt;/code&gt; with &lt;code&gt;setTransform(ratio, 0, 0, ratio, 0, 0)&lt;/code&gt;, otherwise the strokes look blurry on a phone. A resize (turning the phone sideways) clears the pad, the same as pressing Clear, rather than stretching the drawing.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Drawing itself is three pointer events (&lt;code&gt;pointerdown&lt;/code&gt;, &lt;code&gt;pointermove&lt;/code&gt;, &lt;code&gt;pointerup&lt;/code&gt;) with &lt;code&gt;setPointerCapture&lt;/code&gt;, and &lt;code&gt;touch-action: none&lt;/code&gt; on the canvas so the page doesn't scroll while you sign.&lt;/p&gt;

&lt;h2&gt;
  
  
  The bug the tests didn't catch
&lt;/h2&gt;

&lt;p&gt;The first version inserted the pad right after the input with &lt;code&gt;input.insertAdjacentElement("afterend", pad)&lt;/code&gt;. The tests were happy: the script parsed, the file appeared, the right name came through.&lt;/p&gt;

&lt;p&gt;Then I drew a line on it in Chrome and the name box above lit up with a focus ring. Every stroke. It took me a minute to see why: the input sits inside its &lt;code&gt;&amp;lt;label&amp;gt;&lt;/code&gt;, so "right after the input" is still inside the label, and clicking anywhere inside a label focuses the control it belongs to. On a phone that pops the keyboard up the moment you put your finger down to sign. Lovely.&lt;/p&gt;

&lt;p&gt;Moving the pad out of the label fixed it:&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;const&lt;/span&gt; &lt;span class="n"&gt;host&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;closest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"label"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="n"&gt;input&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;host&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;insertAdjacentElement&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"afterend"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;pad&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A day later, signing a real form on production turned up one more: a form that had uploads switched on only for the drawing also showed a generic "Attachments" box. Harmless, but odd on a waiver. Neither problem is visible in the markup. You only notice them when you sign something.&lt;/p&gt;

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

&lt;p&gt;I signed a test waiver on 19 November on the form's own page: typed a name, scribbled, ticked the box, hit Sign. Fifteen seconds later Gmail had the notification with every answer, &lt;code&gt;agree: yes&lt;/code&gt;, the typed name, and a link to &lt;code&gt;signature.png&lt;/code&gt;. 10,884 bytes, 924 by 280, white background, my two terrible lines in the middle.&lt;/p&gt;

&lt;p&gt;The liability waiver template on &lt;a href="https://formgong.com/en/tools/liability-waiver-form/" rel="noopener noreferrer"&gt;formgong.com&lt;/a&gt; has four versions with the pad already on, if you want to poke at it.&lt;/p&gt;

&lt;p&gt;One thing I still go back and forth on: we treat the drawing as optional and the typed name as the real signature. Some tools require the drawing. Which way would you go, and why?&lt;/p&gt;

</description>
      <category>html</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>a11y</category>
    </item>
    <item>
      <title>Detect Rank Ties Before You Name a Benchmark Winner</title>
      <dc:creator>gresiuseo</dc:creator>
      <pubDate>Fri, 20 Nov 2026 10:09:51 +0000</pubDate>
      <link>https://dev.to/gresiuseo/detect-rank-ties-before-you-name-a-benchmark-winner-3ag1</link>
      <guid>https://dev.to/gresiuseo/detect-rank-ties-before-you-name-a-benchmark-winner-3ag1</guid>
      <description>&lt;p&gt;A table displays both providers at &lt;code&gt;3.01 s&lt;/code&gt;. One is numbered first and the other second. A ranking that secretly uses more precision than it displays invites readers to infer a difference they can’t see. A &lt;a href="https://solvcaptcha.com/rankings/" rel="noopener noreferrer"&gt;SolvCaptcha rankings page&lt;/a&gt; is a useful example of the kind of comparison an editor might review. The small test below uses synthetic data to make the tie rule explicit.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Written with AI and checked on synthetic durations. The cover illustration is AI-generated.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Decide which differences the comparison can support
&lt;/h2&gt;

&lt;p&gt;There are different reasons to declare a tie. Two displayed observations may land on the same rounding boundary. Two measured values might also be too close given measurement uncertainty. The first is a presentation rule. It cannot establish statistical equivalence. If the data comes with uncertainty intervals or multiple trials, use those to support any claim that a real advantage exists.&lt;/p&gt;

&lt;p&gt;This example ranks by displayed latency to two decimal places. Equal displayed values receive the same rank. A missing value stays out of the ordered ranking. Alphabetical ordering breaks ties only for display, never for rank. That detail helps keep a chart stable even if the input arrives in another order.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;decimal&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nc"&gt;Decimal&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;ROUND_HALF_UP&lt;/span&gt;
&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;itertools&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;groupby&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;rank_by_display&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;samples&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;ranked&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;unavailable&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;label&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;raw&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;samples&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;raw&lt;/span&gt; &lt;span class="k"&gt;is&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="n"&gt;unavailable&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;label&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
            &lt;span class="k"&gt;continue&lt;/span&gt;
        &lt;span class="n"&gt;seconds&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Decimal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;raw&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;seconds&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;is_finite&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="n"&gt;seconds&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
            &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;ValueError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Expected a positive duration"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;ranked&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;append&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;seconds&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;quantize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;Decimal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"0.01"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;ROUND_HALF_UP&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;label&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

    &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;display&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;group&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;groupby&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;sorted&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ranked&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;key&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="k"&gt;lambda&lt;/span&gt; &lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;item&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;labels&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;label&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;_&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;label&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;group&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
        &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;extend&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;label&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;display&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;label&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;labels&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
        &lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;labels&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;sorted&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;unavailable&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;


&lt;span class="n"&gt;sample&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"beta"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"3.013"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"alpha"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"3.006"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"gamma"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"3.214"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"delta"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;ranks&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;missing&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;rank_by_display&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sample&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="n"&gt;ranks&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"alpha"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Decimal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"3.01"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"beta"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Decimal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"3.01"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                 &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"gamma"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Decimal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"3.21"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="n"&gt;missing&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"delta"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="nf"&gt;rank_by_display&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;reversed&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sample&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;ranks&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;missing&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Two joint firsts at 3.01 seconds; unmeasured provider kept separate"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The local test grouped Alpha and Beta at rank one and kept Delta unranked. For a live report, write the rule next to the numbers. A reader should be able to reconstruct the order from what you display and understand whether your rank describes rounded values, a statistical model, or an editorial decision.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep the results suitable for reuse
&lt;/h2&gt;

&lt;p&gt;If you export the comparison, preserve the raw value beside the display value and include the rounding specification. Downstream charts can then use the publication’s display policy without trying to duplicate an undocumented operation. If you later adopt a statistical rule, attach its own label and input assumptions rather than comparing the new ranks directly to an older table ranked by display. A change in policy often creates a change in rank without any change in measurements.&lt;/p&gt;

</description>
      <category>python</category>
    </item>
    <item>
      <title>It Was Meant To Be Just A Party Trick</title>
      <dc:creator>Joshua Orotayo</dc:creator>
      <pubDate>Fri, 20 Nov 2026 10:09:13 +0000</pubDate>
      <link>https://dev.to/josh_builds/it-was-meant-to-be-just-a-party-trick-3lf</link>
      <guid>https://dev.to/josh_builds/it-was-meant-to-be-just-a-party-trick-3lf</guid>
      <description>&lt;p&gt;I'd like to think that most technically minded people have seen a Rubik's cube and thought "wow, that looks like magic". Then, just as quickly, decided it was beyond them and unattainable.&lt;/p&gt;

&lt;p&gt;Or, even wilder, you bought one, scrambled it, struggled, peeled off the stickers, rearranged the blocks and put it back together again.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I know I did.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;But 2 years before I went to uni I decided to overcome this hurdle and add a wonderful skill to my near empty university prep toolbox. It would be the party trick to beat all party tricks! (mwuahahaha)&lt;/p&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgb2ix4g71oehl4ditquq.png" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgb2ix4g71oehl4ditquq.png" alt="Patrick star evil laugh" width="498" height="331"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After endless spams of algorithms like this one:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;R, U, R', U, R, U2, R'&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;and countless Youtube videos, I solved it for the first time. It took over 8 hours.&lt;/p&gt;

&lt;p&gt;Then my times dropped:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;3 hours&lt;/strong&gt; the next time&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;25 minutes&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;18 minutes&lt;/strong&gt; for a while&lt;/li&gt;
&lt;li&gt;Under &lt;strong&gt;7 minutes&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;My passion, energy and sheer stubbornness cut that time down in just 2-3 weeks. Within 2 months, I was consistently under 2 minutes, without looking at my algorithm cheatsheets 😭. By the time I finished uni, I’d even hit a personal best of 26 seconds on a 3x3.&lt;/p&gt;

&lt;p&gt;Fast forward to my final year at university, where I built an Android app, Algorubick, that teaches people the algorithms behind solving a Rubik’s Cube through repetition. It helped me graduate with a First in Computer Science. &lt;/p&gt;

&lt;p&gt;It covered everything from saving solutions and methods to help with algorithms and notation, and I hoped it would become a ‘one-stop shop’ for all things cubing.&lt;/p&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdvm80cnggegris1wkvjs.png" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdvm80cnggegris1wkvjs.png" alt="Algorubick app image" width="800" height="391"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Along the way I’d used the cube in all sorts of environments. I’d shown off at parties, dazzled drunk football fans on trains, started conversations and fumbled openly (and often), and had a great time doing all of it.&lt;/p&gt;

&lt;p&gt;It helped me beyond uni too. A small 3x3 puzzle of seemingly random blocks, with 43 quintillion combinations, small enough to fit in your pocket, turned out to be far more than a party trick.&lt;/p&gt;

&lt;p&gt;Programming for me is a lot like solving a Rubik’s Cube. Sometimes I stumble and get stuck for hours, and other times I fly ahead with no brakes. What I’m learning along the way is more than party tricks. It’s the stories I tell and the fond memories of projects started and unfinished, with a seemingly endless combination of things still to come and lessons still to learn.&lt;/p&gt;

&lt;p&gt;All of that is to say that in this first post, I'm just saying&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Hello World"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;My interests will probably shift over time and I’ll pick up more knowledge, just like I did with cubing. I expect these posts to document an interesting journey, with plenty of my personality, quirks and humour mixed in.&lt;/p&gt;


&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
        &lt;div class="c-embed__cover"&gt;
          &lt;a href="https://play.google.com/store/apps/details?id=com.jorotayo.algorubickrevamped&amp;amp;amp%3Bhl=en_GB" class="c-link align-middle" rel="noopener noreferrer"&gt;
            &lt;img alt="" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fplay-lh.googleusercontent.com%2FKM9fWUkqjFz1d0Vjng84HW9LA_lT4OZYz3K6YOHh31P50trne8akX93__9xpBknxZTjTGedaqOdGIgeDb-TijN0%3Ds0-br30" height="512" class="m-0" width="512"&gt;
          &lt;/a&gt;
        &lt;/div&gt;
      &lt;div class="c-embed__body"&gt;
        &lt;h2 class="fs-xl lh-tight"&gt;
          &lt;a href="https://play.google.com/store/apps/details?id=com.jorotayo.algorubickrevamped&amp;amp;amp%3Bhl=en_GB" rel="noopener noreferrer" class="c-link"&gt;
            Algorubick - Apps on Google Play
          &lt;/a&gt;
        &lt;/h2&gt;
          &lt;p class="truncate-at-3"&gt;
            A one stop hub for all things cubing
          &lt;/p&gt;
        &lt;div class="color-secondary fs-s flex items-center"&gt;
            &lt;img alt="favicon" class="c-embed__favicon m-0 mr-2 radius-0" src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.gstatic.com%2Fandroid%2Fmarket_images%2Fweb%2Ffavicon_v3.ico" width="32" height="32"&gt;
          play.google.com
        &lt;/div&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


</description>
      <category>softwaredevelopment</category>
      <category>newbie</category>
      <category>puzzles</category>
      <category>androiddev</category>
    </item>
    <item>
      <title>SmartPulse Focus &amp; Wellness Monitor: Real-Time Pacing with SmartSpectra SDK</title>
      <dc:creator>Suriya Kumar</dc:creator>
      <pubDate>Fri, 20 Nov 2026 10:09:13 +0000</pubDate>
      <link>https://dev.to/suriya_kumar_032b4d4e13f5/smartpulse-focus-wellness-monitor-real-time-pacing-with-smartspectra-sdk-nie</link>
      <guid>https://dev.to/suriya_kumar_032b4d4e13f5/smartpulse-focus-wellness-monitor-real-time-pacing-with-smartspectra-sdk-nie</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/presage-2026-11-04"&gt;Presage SmartSpectra SDK Challenge&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

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

&lt;p&gt;I built &lt;strong&gt;SmartPulse Focus &amp;amp; Wellness Monitor&lt;/strong&gt;, an application powered by the Presage SmartSpectra SDK that reads real-time human signals through a camera—such as pulse and breathing rate—and provides calm, practical visual cues to help users pace their work and take timely breaks during long shifts. It is designed as a general wellness and focus companion, not a medical tool.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;[Demo Video Link Here]&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;[GitHub Repository Link Here]&lt;/p&gt;

&lt;h3&gt;
  
  
  Setup Instructions
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Clone the public repository and install dependencies according to the project README.&lt;/li&gt;
&lt;li&gt;Register for a Presage SmartSpectra developer API key and add it to your environment configuration (never hardcode secrets in public commits).&lt;/li&gt;
&lt;li&gt;Run the application locally, grant camera permission when prompted, and view live signal feedback.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  How It Responds to Human Signals
&lt;/h2&gt;

&lt;p&gt;The app uses live camera-captured signals from the Presage SmartSpectra SDK—specifically &lt;strong&gt;pulse&lt;/strong&gt; and &lt;strong&gt;breathing rate&lt;/strong&gt;—to adjust the interface state in real time:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Steady rhythm:&lt;/strong&gt; Displays a calm focus indicator so the user can stay on task without distraction.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Elevated pace / stress cue:&lt;/strong&gt; Gently prompts a short breathing pause or hydration/stretch break.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Integration flow: The app initializes the SmartSpectra SDK with the developer API key, streams camera frames into the SDK pipeline, subscribes to real-time signal updates, and maps those values to UI status cues.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Best Thoughtful Real-World Use:&lt;/strong&gt; People working long hours or demanding schedules often push through fatigue without noticing physical pacing cues. SmartPulse offers a straightforward, opt-in break and pacing prompt with clear user control and transparent handling of camera access.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Consent and Data Handling
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Camera Consent:&lt;/strong&gt; Camera access is strictly opt-in and only starts after the user explicitly clicks to begin a session. No covert or background monitoring occurs.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Data Storage, Sharing, Retention &amp;amp; Deletion:&lt;/strong&gt; The app does not intentionally store raw facial video recordings on external servers. Session metrics are used for real-time display during active use and cleared when the session ends.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SDK Telemetry &amp;amp; Third-Party Services:&lt;/strong&gt; Camera frames and physiological signals are processed through the Presage SmartSpectra SDK according to Presage's developer terms, privacy documentation, and telemetry behavior. No external optional AI services or third-party data sales are used by this app.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Non-Medical Notice:&lt;/strong&gt; This project does not provide medical diagnosis, treatment, or clinical decision-making.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Agent Session
&lt;/h2&gt;

</description>
      <category>devchallenge</category>
      <category>presagechallenge</category>
    </item>
    <item>
      <title>Test a Benchmark Table Import With Reordered Columns</title>
      <dc:creator>gresiuseo</dc:creator>
      <pubDate>Fri, 20 Nov 2026 10:09:03 +0000</pubDate>
      <link>https://dev.to/gresiuseo/test-a-benchmark-table-import-with-reordered-columns-1e97</link>
      <guid>https://dev.to/gresiuseo/test-a-benchmark-table-import-with-reordered-columns-1e97</guid>
      <description>&lt;p&gt;A team exports a comparison table by hand, moves the columns for a presentation and imports it into a notebook. A positional parser now reads a correctness figure as a response rate. Both fields hold percentages, so the error passes a type check. The labels visible on &lt;a href="https://captchathecat.com/" rel="noopener noreferrer"&gt;CaptchaTheCat&lt;/a&gt; provide a useful model for a small offline regression fixture.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Written with AI. The parser was checked on synthetic CSV content. The cover illustration is AI-generated.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Match column names and keep absent values distinct
&lt;/h2&gt;

&lt;p&gt;The fixture uses our own normalized header names. The adapter that prepares a manual export would map the original labels to these names and record the source date. The importer requires each needed field exactly once. If a header has been renamed, it fails with an explicit error instead of shifting to the next column. A blank measurement is returned as &lt;code&gt;None&lt;/code&gt;, preserving the distinction between no measurement and an observed zero.&lt;/p&gt;

&lt;p&gt;I’d keep this check close to the point where external data enters the notebook. Once a value has been renamed to &lt;code&gt;accuracy&lt;/code&gt;, a reviewer can’t see that it originally came from the next column. The test uses two line orders with the same field values and compares the actual parsed records.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;csv&lt;/span&gt;
&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;decimal&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nc"&gt;Decimal&lt;/span&gt;
&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;io&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nc"&gt;StringIO&lt;/span&gt;

&lt;span class="no"&gt;REQUIRED&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"provider"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"received_pct"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"correct_pct"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;value_or_missing&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;raw&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;raw&lt;/span&gt; &lt;span class="k"&gt;is&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;raw&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;strip&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;
    &lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Decimal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;raw&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;is_finite&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;ValueError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Expected percentage points from 0 to 100"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;csv&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nc"&gt;DictReader&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;StringIO&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;text&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;headers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;fieldnames&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;!=&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="ow"&gt;or&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="no"&gt;REQUIRED&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="kt"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;ValueError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Missing or duplicate CSV headers"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"provider"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;value_or_missing&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"received_pct"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
             &lt;span class="nf"&gt;value_or_missing&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;row&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"correct_pct"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;row&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;


&lt;span class="n"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"provider,received_pct,correct_pct\nfixture-a,88,\nfixture-b,92,0\n"&lt;/span&gt;
&lt;span class="n"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"correct_pct,provider,received_pct\n,fixture-a,88\n0,fixture-b,92\n"&lt;/span&gt;
&lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;a&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"fixture-a"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Decimal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"88"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="kc"&gt;None&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"fixture-b"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Decimal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"92"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nc"&gt;Decimal&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"0"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="k"&gt;try&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"provider,received_pct,received_pct,correct_pct\na,80,90,70"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;except&lt;/span&gt; &lt;span class="nc"&gt;ValueError&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;exc&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="s2"&gt;"duplicate"&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="kt"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;exc&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;raise&lt;/span&gt; &lt;span class="nc"&gt;AssertionError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Duplicate CSV header accepted"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Column reorder passed. Missing and zero distinguished. Duplicate rejected."&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The local run passed. The two orders produce equivalent rows, and the duplicate header fails. In a production import, give the row a period and validate the dataset’s measurement window before comparing providers. This parser proves that it can identify a field even when a spreadsheet user moves it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Test the symptoms an analyst would see
&lt;/h2&gt;

&lt;p&gt;Use different values for the two percentages. An input that happens to have both at &lt;code&gt;90&lt;/code&gt; will let a positional bug pass even when the test moves the columns. I’d also pass a blank and a literal &lt;code&gt;0&lt;/code&gt; through the report’s formatting layer. The first should render as unavailable and the second as zero percent. The import test catches a data mapping bug, while the rendering test catches a view that turns a missing value into an observation.&lt;/p&gt;

</description>
      <category>python</category>
    </item>
    <item>
      <title>Assert That Account Request URLs Stay Out of Your Logs</title>
      <dc:creator>gresiuseo</dc:creator>
      <pubDate>Fri, 20 Nov 2026 10:08:58 +0000</pubDate>
      <link>https://dev.to/gresiuseo/assert-that-account-request-urls-stay-out-of-your-logs-56ng</link>
      <guid>https://dev.to/gresiuseo/assert-that-account-request-urls-stay-out-of-your-logs-56ng</guid>
      <description>&lt;p&gt;An account integration raises an exception and the HTTP library includes the full request URL. That is convenient for debugging until the URL happens to contain a credential. The &lt;a href="https://solvecaptcha.com/captcha-solver-api" rel="noopener noreferrer"&gt;SolveCaptcha API reference&lt;/a&gt; documents account credentials in request parameters. A local test can exercise the scenario without transmitting any credential or making a provider request.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Written with AI. The Python fixture was run locally with invented request data. The cover illustration is AI-generated.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Build a new log record from approved fields
&lt;/h2&gt;

&lt;p&gt;I’d rather record an operation name, an internal request reference and a coarse result than keep a sanitized copy of whatever URL happened to appear. Any blacklist starts from the assumption that the next developer uses the same parameter names. A small allowlist avoids carrying an unexpected fragment, a username embedded in a URL, or a secret in the path.&lt;/p&gt;

&lt;p&gt;The sample handles one known account operation and recognizes a correlation ID only when it matches the application’s own narrow format. It turns any different path into a general label. It does not return the URL or the original exception message. This is one layer of defense. A logging middleware or a distributed trace can still capture URLs independently.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;
&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;urllib&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;parse&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="n"&gt;parse_qs&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;urlsplit&lt;/span&gt;

&lt;span class="no"&gt;REF&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nb"&gt;compile&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;r&lt;/span&gt;&lt;span class="s2"&gt;"req-[a-z0-9]{1,12}"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;flags&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="n"&gt;re&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="no"&gt;ASCII&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;


&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;event_for&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;parsed&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;urlsplit&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;record&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"operation"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"provider_account"&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;parsed&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;path&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="s2"&gt;"/account"&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="s2"&gt;"provider_other"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
              &lt;span class="s2"&gt;"outcome"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"upstream_error"&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;status&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;500&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="s2"&gt;"completed"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
    &lt;span class="n"&gt;refs&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;parse_qs&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;parsed&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"request_ref"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="nb"&gt;len&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;refs&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="no"&gt;REF&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;fullmatch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;refs&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;record&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"request_ref"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;refs&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;record&lt;/span&gt;


&lt;span class="n"&gt;test_url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"https://fixture-user:fake-pass@example.test/account?"&lt;/span&gt;
            &lt;span class="s2"&gt;"key=fake-key&amp;amp;request_ref=req-abc123#private-fragment"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;record&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;event_for&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;test_url&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;502&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="n"&gt;record&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="s2"&gt;"operation"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"provider_account"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"outcome"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"upstream_error"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
                  &lt;span class="s2"&gt;"request_ref"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"req-abc123"&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="nb"&gt;any&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;word&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;repr&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;record&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;word&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"fixture-user"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"fake-pass"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"fake-key"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"private-fragment"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="s2"&gt;"request_ref"&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;event_for&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="s2"&gt;"https://example.test/account?request_ref=req-first&amp;amp;request_ref=req-second"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;assert&lt;/span&gt; &lt;span class="s2"&gt;"request_ref"&lt;/span&gt; &lt;span class="ow"&gt;not&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nf"&gt;event_for&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"https://example.test/fake-key?request_ref=bad!"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;200&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"The log contains only the operation, outcome and approved reference"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The test keeps the synthetic secret, username and fragment out of the resulting record. The fictitious &lt;code&gt;/account&lt;/code&gt; route represents the adapter’s own routing policy, rather than a path to call on any provider. Expand the fixture alongside that policy if you later add operations.&lt;/p&gt;

&lt;p&gt;For an integration test, capture what actually reaches the configured log sink. Exercise one refusal and one transport exception. An assertion on the helper alone will miss a caller that logs the original exception next to the cleaned event.&lt;/p&gt;

&lt;h2&gt;
  
  
  Make the evidence useful without the URL
&lt;/h2&gt;

&lt;p&gt;Use the application’s internal request reference to correlate an event with a protected diagnostic system, if your team uses one. A support ticket can contain an approximate time, the operation category and the reference. The operator can then find the event without reconstructing the original request from the log. Document which layer generates the reference. If it is generated by the caller and allowed to contain arbitrary text, it can become a second route for unwanted data.&lt;/p&gt;

</description>
      <category>python</category>
    </item>
    <item>
      <title>Python Scenario Based Problem Solving..</title>
      <dc:creator>Narasimma Radhakrishnan</dc:creator>
      <pubDate>Fri, 20 Nov 2026 10:08:40 +0000</pubDate>
      <link>https://dev.to/narasimma/python-scenario-based-problem-solving-2ppj</link>
      <guid>https://dev.to/narasimma/python-scenario-based-problem-solving-2ppj</guid>
      <description>&lt;p&gt;1.A book seller has three types of books:English books = 175,Science books = 245,Mathematics books = 385&lt;br&gt;
He wants to arrange these books into boxes.&lt;/p&gt;

&lt;p&gt;Conditions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Each box must contain an equal number of English books.&lt;/li&gt;
&lt;li&gt;Each box must contain an equal number of Science books.&lt;/li&gt;
&lt;li&gt;Each box must contain an equal number of Mathematics books.&lt;/li&gt;
&lt;li&gt;No books should be left over.
The question asks us to find:&lt;/li&gt;
&lt;li&gt;The greatest number of boxes required.&lt;/li&gt;
&lt;li&gt;The number of books of each subject in one box.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;solution : &lt;br&gt;
1.TO find hcf for all the three numbers(175, 245,385)&lt;br&gt;
2.That is the greatest number of boxes required.&lt;br&gt;
3.To divide books with hcf value to find the exact number of each subject.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;eng&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;175&lt;/span&gt;
&lt;span class="n"&gt;sci&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;245&lt;/span&gt;
&lt;span class="n"&gt;maths&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;385&lt;/span&gt;

&lt;span class="n"&gt;hcf&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="k"&gt;in&lt;/span&gt; &lt;span class="nb"&gt;range&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;eng&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;

    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;eng&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;sci&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="ow"&gt;and&lt;/span&gt; &lt;span class="n"&gt;maths&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;hcf&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;

&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Greatest number of boxes:"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;hcf&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"English books in each box:"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;eng&lt;/span&gt; &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="n"&gt;hcf&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Science books in each box:"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;sci&lt;/span&gt; &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="n"&gt;hcf&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"Maths books in each box:"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;maths&lt;/span&gt; &lt;span class="o"&gt;//&lt;/span&gt; &lt;span class="n"&gt;hcf&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Greatest number of boxes: 35
English books in each box: 5
Science books in each box: 7
Maths books in each box: 11
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>algorithms</category>
      <category>beginners</category>
      <category>programming</category>
      <category>python</category>
    </item>
    <item>
      <title>When AI Assistants Became My Traffic Source: A Practical Guide to Generative Engine Optimization</title>
      <dc:creator>Nico ZHUO</dc:creator>
      <pubDate>Fri, 20 Nov 2026 10:08:09 +0000</pubDate>
      <link>https://dev.to/nico_zhuo_673a168bc66139a/when-ai-assistants-became-my-traffic-source-a-practical-guide-to-generative-engine-optimization-1gg2</link>
      <guid>https://dev.to/nico_zhuo_673a168bc66139a/when-ai-assistants-became-my-traffic-source-a-practical-guide-to-generative-engine-optimization-1gg2</guid>
      <description>&lt;p&gt;Over the past six months, something quietly shifted in my analytics. A growing slice of traffic to my creative tools site, &lt;a href="https://arui.ai" rel="noopener noreferrer"&gt;Arui.AI&lt;/a&gt;, no longer comes from Google alone — it comes from ChatGPT, Perplexity, and Gemini citing my pages when people ask for tool recommendations.&lt;/p&gt;

&lt;p&gt;There's a name for preparing for this shift: Generative Engine Optimization, or GEO. Think of it as SEO's sibling, except the "crawler" reading your page is a language model deciding whether your content is worth quoting in an answer. Here's what actually moved the needle for me, in order of impact.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Quantified anchors beat adjectives
&lt;/h2&gt;

&lt;p&gt;LLMs quote specifics, not superlatives. When my feature list said "high-resolution output," nothing cited it. When it said "4K export, 256px detail control, thirty seconds per render," my page started showing up in AI answers comparing tools on quality.&lt;/p&gt;

&lt;p&gt;Every feature on my tool pages now carries at least one number: a percentage, a time, a resolution, a count. This is the single highest-leverage change I made. Language models can lift "4K" straight into an answer. They cannot lift "amazing quality."&lt;/p&gt;

&lt;h2&gt;
  
  
  2. FAQ answers that lead with the verdict
&lt;/h2&gt;

&lt;p&gt;People ask AI assistants questions in natural language: "Is there an AI tool that converts images to video?" — so my FAQ questions match that phrasing instead of marketing labels like "Output Capabilities."&lt;/p&gt;

&lt;p&gt;More importantly, the first sentence of every answer is a direct verdict: yes or no, followed by the explanation. LLMs disproportionately quote the opening sentence of a passage. If your first sentence is throat-clearing ("Great question! In today's fast-paced world..."), you've burned your most quotable line.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Tables and comparisons are citation magnets
&lt;/h2&gt;

&lt;p&gt;When I added a three-column comparison table to my &lt;a href="https://arui.ai/ai-image-generator" rel="noopener noreferrer"&gt;AI image generator&lt;/a&gt; page — with concrete numbers per tier — AI answers began referencing my data when users asked "X vs Y" questions. Structured rows are trivially easy for a model to extract and restate, far easier than prose paragraphs.&lt;/p&gt;

&lt;p&gt;If your page answers a comparison query with five paragraphs of narrative, you will lose the citation to whoever shipped a table.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Schema.org is your second audience
&lt;/h2&gt;

&lt;p&gt;Structured data isn't just for rich snippets anymore. I keep the SoftwareApplication schema's featureList and description in sync with the same quantified data shown in the UI, so a model can pull structured facts without parsing the full page. Think of schema as a press kit for machines.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Alt text that describes, not repeats
&lt;/h2&gt;

&lt;p&gt;My image alt text used to mirror the heading. Now it describes what the image shows and the technical characteristic visible in it. It's a small thing, but multimodal pipelines read it, and it costs nothing.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I can't control — and why I still do this
&lt;/h2&gt;

&lt;p&gt;I can't see most AI-platform referrals cleanly, and citation behavior is a black box. But the direction is clear: answer engines need quotable sources, and most tool sites still read like brochures. The bar for being the cited source is lower than the bar for ranking #1 on Google, and the traffic compounds as assistants proliferate.&lt;/p&gt;

&lt;p&gt;The playbook is boring and repeatable: numbers in every claim, verdicts in first sentences, tables for comparisons, schema in sync, descriptive alt text. None of it is glamorous. All of it is quotable.&lt;/p&gt;

&lt;p&gt;If you run a tools site, audit one page today against those five rules. Then ask an AI assistant the question that page should answer, and see who gets cited.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>productivity</category>
    </item>
  </channel>
</rss>
