As I sit here, watching my Xerox printer run 14,000 personalized, Increase 401(k) Enrollment documents, I realized I hadn’t posted to this blog in a way-long-time. Rather than write about the money making project at hand, I decided that Archery (at the moment) is more interesting.
My Spousal Unit is a Recurve Archer, which is Olympic style. You’ll never see her in the Olympics, but she’s pretty good for our backyard (New York) and has won a tournament or two in the last 7 or 8 years. My role is to drive her to the tournaments, haul her equipment around, set up her scope and sit on my tail in a lawn chair for one or two days.
If you’ve never watched an Archery tournament then it’s akin to watching your lawn for 7 or 8, unabated hours. The first day is much fun, but day two can be draining.
Archers practice for hours on end. Most of the time – in competition – they shoot 144 arrows, in batches (Ends is their terminology) of 3 or 6 at a time. Usually, there are two people shooting at a target and when their time is up (one hour in dog years), another crew of two step up (the 2nd Line). When it becomes obvious everyone is done, they walk to the target, write down their score for each arrow, draw little lines in the target, then walk back. Whistles blow at different times to keep them from killing each other. Sometimes people miss the target, then the chubby guy with the whistle walks around with a metal detector. Eventually, they come back and start again.
Bored yet? Good. I need company.
Anyway, I decided to make a way for Archer’s to record their practice scores via the web – knowing that no archer would ever use it.
Here’s how I did it:
1) I used our Online CMS & Knowledge Management System (the Template tool), to draw a set of concentric circles of the correct color. Positioned each of them correctly – and rasterized the vectors into an image.
2) Next, I made a web page, a couple of Tables (for storing the data) and a bit of Javascript that records the position of a mouseclick and submits it to the Table that holds the x,y position of each arrow.
3) Step 3 (give or take), was to write a couple of queries that would calculate the score (based on the mouseclick position), sum all the scores – and also allow for clearing all the arrows off the target – and store in a history Table.
4) Finally, I made a dot chart – which plots every arrow dynamically – and returns the dot to the page.
The query:
SELECT “xyarchery”.”archer” as “archer”, “xyarchery”.”session” as “xyarchery_session”, “xyarchery”.”arrow_number” as “arrow”, IF(mod(“xyarchery”.”arrow_number”, 6) = 0, 0, 1) + IF(“xyarchery”.”arrow_number” = 1, 0, “xyarchery”.”arrow_number”) / 6 :: integer as “end”, “xyarchery”.”xx” as “x”, “xyarchery”.”yy” as “y_display”, 400 – “xyarchery”.”yy” as “y”, round(GREATEST(10.5 – sqrt(((“xyarchery”.”xx” – 200) ^ 2) + ((“xyarchery”.”yy” – 200) ^ 2)) / 20, 0)) as “score”, ‘ ——>’ as “spacer”, IF(“xyarchery”.”lock” = ‘true’, ‘Practice arrow’, IF(CASE WHEN “xyarchery”.”xx” < 190 THEN ‘left’ WHEN “xyarchery”.”xx” > 210 THEN ‘right’ ELSE ” END || ‘ ‘ || CASE WHEN “xyarchery”.”yy” < 190 THEN ‘hi’ WHEN “xyarchery”.”yy” > 210 THEN ‘lo’ ELSE ” END = ‘ ‘, ‘Nice! 10x’, ‘Was ‘ || CASE WHEN “xyarchery”.”xx” < 190 THEN ‘left’ WHEN “xyarchery”.”xx” > 210 THEN ‘right’ ELSE ” END || ‘ ‘ || CASE WHEN “xyarchery”.”yy” < 190 THEN ‘hi’ WHEN “xyarchery”.”yy” > 210 THEN ‘lo’ ELSE ” END)) as “adjust?”
FROM
“younicycle_com”.”xyarchery” AS “xyarchery”
WHERE “xyarchery”.”arrow_number” > 1
ORDER BY “arrow” desc
LIMIT ALL
OFFSET 0
If anyone has an overwhelming interest in testing it, the page is here: Archery Scoring
Printer just jammed. Back to work. btw for any archers -> my wife shoots around 1,200…. 1,220. Hoping for a 1,250 this year.

