Skip to main content

Today I Learned: URL as Local First Data Storage (You Know for Ham Radio License Exam Practice)

 I've read a little bit about 'local data' lately, and I've become fairly excited about the idea. Two of the features of the concept that I like are that your data should be your own, not stuck behind a corporations gated off wall on the internet and that you should have a copy of that data that lives on physical media within arms reach.

I won't venture into the second one today except to say that with Google, in particular, somewhat constantly doing away with applications it becomes bored with and Amazon deciding it has and then has not rights to serve movies I 'purchased', having my data in a usable format and in arms reach physically makes more sense than I'd like for it to.

Today, I'm going to talk about the first thing, being in control of your own data to use as you see fit. As someone who develops open source apps, there are benefits to everyone beside me holding on to their own data. The biggest one for me being that I don't have to figure out where to put anyone's data or how to keep it secure.

Two of my favorite articles about these topics are these two from Maggie Appleton 

"Organic, Local, Artisan Data Storage"

which is a tad more of an abstract and coneptual

"Home-Cooked Software and Barefoot Developers"

which talks about being able to LLM create code for use with your own data in ways that appeal to you. This one relates directly to the things I'll discuss here.

And that brings me to a really cool data handling pattern I observed in the Cesium Sandcastle app. When you share a link to your specific sandcastle, the link it unwieldyh, and sometimes huge. I discovered, (for me), this week that the reason for the huge share URL is that my code is 64bit text encoded into the URL. All my data for use with the Sandcastle app is stored in my latest share URL, not on an Cesium drive anywhere!

And that brings us to ham radio practice exams. I bet you didn't see that coming. Actually, I'm sure long time readers of this blog totally saw that coming.

I'm slowly but surely updating my old, free ham radio exam practice apps. I'm going to use Datasette as the backend. I'm also going to be programming, (not vibe programming, I mean, if I'm that lucky, ok, but I doubt that will happen), using an LLM assistant; in all likelihood, ChatGPT. The current exams store the following data per user

  1. History of total exam score
  2. History of score per exam section
  3. Pie chart of seen vs. unseen questions for the entire exam, (the question pool is published by the FCC, so when you study for the exam, you're literally learning the questions on the actual exam.)
  4. Pie chart of seen vs. unseen questions for each of the ten sections.
  5. Similar pie charts for 'answere correctly' vs. 'answered incorrectly' in the same fashion as 3 and 4 above.
It would be easy enough to store all that data for each user in the URL. My storage costs then drop to zero and the practice exam become a quasi-static web page that's loaded by your particular URL each time you practice.

How could all this work? Off the top of my head, when the user answers the last question, they could be presented with a link labeled, 'click to see your test results' that would take them to a URL that contained all the data above. I think it's actually that simple!

Then, stock JavaScript  can perform the rest of the features of the exams using the students data out of the URL! The app can still

  1. Offer tests with only questions you've never seen
  2. Tests with questions you've never answered correctly
  3. Study sessions of single sessions launched from your session score history, (bar graph.)
This is all so cool, and will be so easy in comparison to having accounts and passwords and storage and, and, anyway :)

History Notes

I found a few links via Simon Willison's blog about the practice of storing state in # segments of URLs. In some cases, back in 2010/2011 it was frowned upon. I'm not convinced the model here is or could be one of those cases. I'm pretty convinced it's not. Here's the background




Comments

Popular posts from this blog

Cool Math Tricks: Deriving the Divergence, (Del or Nabla) into New (Cylindrical) Coordinate Systems

Now available as a Kindle ebook for 99 cents ! Get a spiffy ebook, and fund more physics The following is a pretty lengthy procedure, but converting the divergence, (nabla, del) operator between coordinate systems comes up pretty often. While there are tables for converting between common coordinate systems , there seem to be fewer explanations of the procedure for deriving the conversion, so here goes! What do we actually want? To convert the Cartesian nabla to the nabla for another coordinate system, say… cylindrical coordinates. What we’ll need: 1. The Cartesian Nabla: 2. A set of equations relating the Cartesian coordinates to cylindrical coordinates: 3. A set of equations relating the Cartesian basis vectors to the basis vectors of the new coordinate system: How to do it: Use the chain rule for differentiation to convert the derivatives with respect to the Cartesian variables to derivatives with respect to the cylindrical variables. The chain ...

The Valentine's Day Magnetic Monopole

There's an assymetry to the form of the two Maxwell's equations shown in picture 1.  While the divergence of the electric field is proportional to the electric charge density at a given point, the divergence of the magnetic field is equal to zero.  This is typically explained in the following way.  While we know that electrons, the fundamental electric charge carriers exist, evidence seems to indicate that magnetic monopoles, the particles that would carry magnetic 'charge', either don't exist, or, the energies required to create them are so high that they are exceedingly rare.  That doesn't stop us from looking for them though! Keeping with the theme of Fairbank[1] and his academic progeny over the semester break, today's post is about the discovery of a magnetic monopole candidate event by one of the Fairbank's graduate students, Blas Cabrera[2].  Cabrera was utilizing a loop type of magnetic monopole detector.  Its operation is in...

More Cowbell! Record Production using Google Forms and Charts

First, the what : This article shows how to embed a new Google Form into any web page. To demonstrate ths, a chart and form that allow blog readers to control the recording levels of each instrument in Blue Oyster Cult's "(Don't Fear) The Reaper" is used. HTML code from the Google version of the form included on this page is shown and the parts that need to be modified are highlighted. Next, the why : Google recently released an e-mail form feature that allows users of Google Documents to create an e-mail a form that automatically places each user's input into an associated spreadsheet. As it turns out, with a little bit of work, the forms that are created by Google Docs can be embedded into any web page. Now, The Goods: Click on the instrument you want turned up, click the submit button and then refresh the page. Through the magic of Google Forms as soon as you click on submit and refresh this web page, the data chart will update immediately. Turn up the:...