FlyerTalk Forums - View Single Post - Calculator for SQM, Aeroplan miles, & SQD
Old Oct 18, 2022 | 11:42 pm
  #588  
canadiancow
A FlyerTalk Posting Legend
1M
40 Countries Visited
All eyes on you!
10 Years on Site
 
Join Date: Sep 2012
Location: SFO
Programs: AC SE MM, SK Gold, Bonvoy Plat LTG, Hyatt Glob, HH Diamond
Posts: 47,290
I don't want to even update the link in the wiki yet (let alone kill the old one), but I've made some architectural changes to the calculator, which are all available at https://acsqd.cowtool.com/. And it's all still open-source.

Previously, the backend returned the HTML you saw. Now, the backend returns JSON, and the front-end renders it.

1. This moves it onto the same general platform that most cowtools are using
2. This allows it to return "machine-readable code", so I can update the PNR tool to directly access the calculator, rather than having a "copy" of its code. When I do this (and this is independent of shutting down the old calculator, so I'm going to make that work first), it means that any quick CSV updates to distances will be "instantly" available in both the calculator and the PNR tool.
3. I don't know, maybe I can save your queries to your cowtool account if that's something people want.
4. I never liked this calculator. I worked on the web-accessible system mostly to migrate it from a spreadsheet so the PNR tool could figure stuff out [1]

One thing to note in case anyone is concerned: If you access the new page, and you're logged in, it will show you're logged in. But you don't need to be logged in. This is still an open-source project, and everything other than my AWS deploy keys are completely accessible so anyone can do whatever they want with it.

I'm not killing the old one yet. But it's on my near-term roadmap. The new one even has better number formatting. So columns don't randomly shift from right-aligned to center-aligned. And you'll get commas in all the big numbers. Or not commas. It uses client-side regional settings.

But there's at least one distance that's only on the new site, and continued updates will only be on the new site.

[1] King Chung Huang, once this full migration is done, I'm quite happy to switch the front- and back-end to your (better on several fronts) calculator. As long as I can host a Lambda that lets my PNR tool access all the data it needs.
canadiancow is online now