Golf: a chipping calculator

I watched a short video about Paul Runyan's rule of 12 for chipping. You pace off the carry to your landing spot and the roll from the landing spot to the hole. Divide roll by carry, subtract the result from 12, and the number you get is the club. A 7 means the 7 iron. Numbers above 9 walk down through the wedges. On uphill or slow greens you play the rule of 11 or 10, and on downhill or fast greens you play 13 or 14. Easy, right?

That is exactly the kind of thing you forget while standing over the ball, so we wanted it on our phones for the course. This is also not the thing I want to spend a lot of time to develop. I copied the video transcript into Atlas and asked it to make me an app which would work well on my phone. 5 minutes later and it was perfect, first pass.

The whole thing is four static files: an HTML page, a service worker, a manifest, and an icon. There is no framework, no build step, and nothing to sign up for. It runs on the home server behind the same tunnel as everything else. The service worker caches it after the first load, so it keeps working in airplane mode in the middle of a fairway. You add it to the home screen once and it behaves like an app from then on.

This is the way you would install it today, although since yesterday, I have built a framework to do all of the setup for you (at least in cloudflare when using Atlas). The better part of this will come in a future story. I discovered this framework is useful in practically every app I build, and that not everything needs its own app either. Domains? Remember that word or the idea of what it represents. I should be able to build ideas into useful workflows with minimal input. I can. You will be able to soon as well.

From the idea to a working page on both phones took one sitting. The calculator is trivial, and that is the point. When you own the whole path from an idea to a URL, software this small becomes worth making. Nobody would sign up for a subscription service to remember golf math for them, but four files on a box you already run clear that bar easily.

The code is on GitHub at https://github.com/ecpunk/rule-of-12 if you want a copy. Host it on anything that serves static files and it is yours.