Skip to main content

Posts

Finally Writing About this Dad Stuff Again

I like reading parenting blogs because they make me think. They make me think so much that I often times wind up copying my blog posts here from my original contents there. If you don't read Evil Witches by Claire Zulkey yet, it's a lot of fun. Anyway, here's my comment to her interview with Cara Goodwin about research based parenting. (Probably not a huge shocker to anyone here, but I tend to go with the research I already agreed with, you know, I'm.... data based... yeah, that's it.... Snort.) Wow! So much of this is so familiar. Thanks for doing this interview, I think it makes for a very much needed buffer against the impressions that I see people get about atttachment and respectful parenting. tldr; I did most of the things, but probalby, per the books, I did them wrong? I did them because I was selfish and they were easy for me in the not-even-slightly common situations I had. We did 'attachment parenting' because strollers just looked like so much w...

Things I Learned: Datasette and links

I spent a little time getting links to work in Datasette. Initially I overthough the problem, imagining that I needed to actual construct the html <a> tag for a link to get it to work in the Datasette table interface. I used the tip on appending text to SQL query results at StackOverflow to create html hyplerlink tags. This decidedly did not work, not becaue the tip was bad, but because Datasette will automatically link a web address without the need for link tags. In the end, the more simple query: select id, question, class, subelement, group_index, group_number, answer, answer_a, answer_b, answer_c, answer_d, "https://hamdaise.wl.r.appspot.com/" || help_link AS help_link from ham_qs where "subelement" = :p0 order by group_index limit 101 worked like a champ. Want links to open in new tabs? There's a plugin for that.

Technician Class Ham Radio Question Pool in Datasette

The 12 year-old here, aka Daize in these pages, and I have been teaching ourselves Datasette, a Python based tool for exploring data sets. We came across the tool the first time as members of the San Francisco Microscopical Society when we attended a meeting about their historical papers database. Datasette , a tool created by Simon Willison is being used to serve their historical document database . It looked like a nice tool to know, but I didn't have an immediate use for it until last week when I got a little bit of bandwidth to setup new help page links for the ham radio practice exam app . I rooted around in the Google App Engine dataset pages a bit, then I played with making pages as templates in the Django based app, (did I mention that Simon was also one of the creators of Django?), and then it occurred to me that Datasette might be the most useful way of inspecting and modifying the help page links. In any event, the kid and I would be learning something new. The short ve...

Things I Learned: Google App Engine Django Platform Search Index Updates

Let's say you have a deployed Google App Engine application you've been using for years like the ham radio practice exams we're updating here. You decide to output data the app is obviously using all the time. For us, it was the table of help topic links for each exam question. You think you're going to output the data easily, and then: NeedIndexError: no matching index found. recommended index is and nothing. This happened here today, (obviously right?) I had to walk through a series of documentation steps and log messages, but the answer in the end was simple. First, the message above doesn't turn up in your app, it turn up in your log message explorer. For us, that's at  https://console.cloud.google.com/logs/query;cursorTimestamp=2023-07-03T15:57:44.595552Z?project=hamdaise Next, that's where you'll find an actually very handy error message with this at the bottom (your data model will be different unless you forked the ham radio exam repo .) That...

Things I Learned: Smoother Beer Bread

Eight year-old Tawnse made beer bread a few days back, and through a mishap, we wound up with a smoother, easier to cut version of the bread we take on camping trips. Here's the recipe: Ingredients 3 C  Self Rising Flour which can be made with: 1 cup all-purpose flour + 1 1/2 teaspoons baking powder + 1/4 teaspoon fine salt 3 Tbsp  Sugar 1 Warm Beer Steps Mix Grease loaf pan Bake at 350 degrees for 1 hour It's really, really simple to make, and it comes out as a pretty rugged loaf of bread that you can wrap in foil and throw in your backpack. Usually—for us—it comes out pretty tough with a craggy crust, and that's ok because it travels well, and it's for camping. On Friday though, the Tawnse—the eight year old's alias here—picked up my beer which I'd taken a few sips from and poured it in. So, we didnt' have enough beer in the bread. I opened the bread intended for the beer, and poured in what seemed like enough to make up the difference. We wound up with ...

Things I Learned: Updating Google App Engine Apps

Back in January, I started to simplify the free ham radio practice exams so they'd be easier for the gang—two of whom are learning to program—and I to update in the future. It. Was. Hard. I fought and fought and finally located the Google App Engine debug console where I could change a file at a time, (and actually see a listing of files.) That console has since been deprecated and dropped, (unbeknownst to me.) Consequently, when 12 year-old Daize and I tried to add a simple fix to a misformatted question this morning… Nope! Oh well. I went through the 7 stages of grieving, but really fast this time, and then went to look for Google App Engine deployment too for Python . Fortunately, it still exists! Now it’s called the Google Cloud CLI . Installation was actually straightforward, and since I stored the entire applciation in github including the app.yaml file, deployment was pretty easy as well. We're back up and running! Refererces Free ham radio exam practice app

Things I Learned: Django to Postgresql setup

I'm playing with Django, a really snazzy template based, database backed web app engine, again this week. I originally encountered the tool when I started making Google App Engine applications years ago. One of the last extant apps from that era is my ham radio exam practice app. This week, while ramping up another project, I did something new, I connected Django to a PostgreSQL database . I'd always used MySQL in the past. There were  steps. They weren't particularly difficult, but I couldn't find much in the way of documentation, and when I did, following the steps in order didn't work for me. Here's what did: Install psycopg2 . (You may need to install psycopg instead depending on your version of Django. Django does a good job of telling you what it actually needs later in the process. Of course, make sure PostgresSQL is already up and running. You'll need to be able to access the postgres user who's default password is in fact postgres. Setup up th...