Case study: GageBlockCalc, a small tool for one trade
This is one of my own projects, not client work. GageBlockCalc is a free calculator that tells a machinist which gage blocks to stack to reach a target size. It is a good example of what a small, focused web tool looks like, and I'm writing down what is true about it, with no invented numbers.
Get a free quote Call (727) 346-8339
Nick's own project. Live at gageblockcalc.com. I have not published usage numbers here, so none are claimed.
The problem
Gage blocks are precision steel or ceramic blocks. A machinist stacks several of them to build an exact length for setting or checking a tool. Picking which blocks to use means working through the digits of the target size so that the blocks add up exactly, and it is easy to choose more blocks than needed or to slip a digit. People often do it on paper, at the machine, with a phone in hand.
What I built
- A calculator where you enter a target size and choose your set, and it returns a stack.
- Support for inch and metric sets, including an 81-piece inch set, plus options for wear blocks.
- Stacks aim for the fewest blocks, and are listed from largest to smallest.
- When two stacks use the same number of blocks, it prefers the one with the least-used blocks. Usage counts are kept in the browser's local storage on your device.
- Links to buy gage block sets. No login and no account.
The stack, in plain words
- Plain HTML, CSS and JavaScript, with no framework, so the page is small and loads quickly on a phone.
- One file holds the stack-finding logic. The same algorithm is used by the web page and by automated tests run in Node, so a change can be checked before it goes live.
- Installable. A web app manifest and a service worker let people add it to a phone home screen and have the files cached.
- Served through Cloudflare as plain static files, with no server of mine to look after.
A real bug, and the fix
An early version could freeze the page. After finding a stack, it also ran an extra search one block deeper, and that search could walk through tens to hundreds of millions of combinations. I removed that step on the normal path. The fallback search that runs only when the classic method fails is now an exact-length search with a hard cap on how many combinations it will try. The page stays responsive.
What this shows for a local business
Most businesses do not need a calculator. But some have one question their customers ask all day: what would this cost, which size do I need, when is the next opening. A small tool that answers that one question can save phone calls. See web development for what I build, or the cost page for pricing: custom tools start at $2,299 and are quoted per project.
See it live
Open GageBlockCalc ↗ More of my own projects
Questions about this project
Is this client work?
No. GageBlockCalc is my own project. I only publish client projects when the owner is happy to share them.
Does it cost anything to use?
It is free to use with no login.
Where is my data stored?
Usage counts for the least-used tiebreak are stored in your browser's local storage on your own device.
Can you build a tool like this for my business?
Yes, custom tools and web apps start at $2,299 and are quoted per project in writing before work begins. You see a free mockup first with $0 upfront.
Do you publish traffic numbers for it?
No. I do not publish numbers I cannot show.
Get a free quote See all packages
Related: Work · Case study: TCG Booth · Web development · Website cost · gageblockcalc.com