Urgent.News

What's breaking now, across hundreds of outlets.

Tech

Building fast, zero-dependency homeowner sizing calculators from public engineering tables

Turning public engineering tables into small, client-side web calculators is one of the highest-utility things you can build with plain HTML and JavaScript. Instead of burying a homeowner under a 40-page PDF, a 30-line script can answer a concrete question in two seconds and link directly to the original agency source. Why keep reference calculators dependency-free? Most utility calculators (tank…

In today's digital age, homeowners can benefit from fast, zero-dependency homeowner sizing calculators built using public engineering tables. These calculators, created with simple HTML and JavaScript, provide immediate answers to concrete questions, bypassing lengthy PDFs and offering direct links to original agency sources. The main advantage of keeping these calculators dependency-free is their ability to function smoothly on mobile devices, offline once cached, and easily auditable when guidelines change.

The authors of a particular guide to septic tanks and private wells developed three small tools based on published public data: septic tank capacity and pumping intervals (from EPA and Penn State Extension), well pump sizing, and pressure tank sizing (from Pentair and The Driller). To ensure accuracy and prevent subtle bugs, two rules were followed: separate the reference data from the UI and keep the lookup table as a plain constant object with clear comments pointing to the source table and year. Additionally, returning both the number and safety rule helps avoid misunderstandings.

One example of a minimal, readable pattern for a pressure tank pre-charge helper is provided. The function `emptyTankPrechargePsi` takes the cut-in PSI as input and returns the pre-charge PSI by subtracting 2. This pattern ensures users understand the assumptions behind the output, such as the specific PSI values for pre-charging based on the cut-in PSI setting.

To build trust with non-technical users, it's essential to show the assumptions right next to the output. For instance, when estimating the pumping interval for a 4-person home with a 1,000-gallon tank, the calculator should display the exact inputs (tank gallons, number of people, and whether there's a garbage disposal) and link to the EPA or extension bulletin behind the data.

Furthermore, the calculator should explicitly guard edge cases like negative or zero inputs, clearly label units (gallons, psi, gpm), and include a short safety reminder about electrical or confined-space hazards.

When structuring the page for speed and accessibility, native HTML elements like label , input type="number" , and select controls should be used within a fieldset . The calculated output should be placed inside an element with aria-live="polite" so screen readers can announce updates automatically without shifting focus. By following these guidelines, the calculator remains lightweight, loads reliably, and stays accessible to a broad audience, even on weak rural cell reception.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

Report a problem with this story

More in Tech

`pnpm dev` fails because of `sharp`: the warning that blocks everything

I run pnpm dev and nothing starts. No error in my code. Just this: [ERR_PNPM_IGNORED_BUILDS] Ignored build scripts: sharp@0.34.5 Run "pnpm approve-builds" to pick which dependencies should be allowed…

  • pnpm dev fails to start due to sharp script error
  • sharp script blocked launch, requiring approval
  • Setting allowBuilds : sharp : true resolves issue

GitHub Custom Roles Finally Separate Security Triage From Admin Access

Image: GitHub changelog illustration of the custom repository role form with security advisory permissions. Giving an engineer permission to read a vulnerability report used to force an uncomfortable…

  • GitHub introduces custom repository roles to separate security triage from admin access.
  • Four new advisory permissions: view, create/edit/manage, accept reports, and publish/CVE request.
  • Limitations include inability to merge changes, delete forks, and view confidential comments.

Drupal Commerce: When It Beats Shopify

Drupal Commerce is the wrong answer for most online shops. That is not a criticism of the project, which is well engineered and has been for fifteen years.

  • Drupal Commerce excels for complex product configurations and ERP integration.
  • Shopify is more cost-effective for simple consumer catalogues with few SKUs.
  • Choice depends on business needs and product complexity.

More from Wednesday 25 November →