• Category Archives tech talk
  • Computers and programs, maps and GPS, anything to do with data big or small, as well as my take on the pieces of equipment I use in other hobbies — think bike components, camping gear etc.

  • SQL FTW

    One of the things I’ve been helping my Mom with are her finances. I started out with spreadsheets to keep track of things, but about six months ago I switched to using GnuCash, an open-source financial program.

    This is a great tool, sometimes a bit more than I need, but sometimes it’s also oddly inadequate: it has all sorts of built-in reports, and they can be customized, but several types of reports are just not available (I am partial to pivot tables). I can export the data I need, but the full export is so complicated as to be almost useless, and the simplified export — they warn about this — doesn’t export certain pieces of data. It was very frustrating.

    (For those playing along at home, I was exporting transactions, specifically ones involving expenses, to CSV, and the simplified export would only list one expense split per transaction. Transactions involving multiple splits were thus incomplete.)

    I happened to come across some online discussions about GnuCash where people were saving their data into databases rather than the standard file, and were then able to use database tools as well as GNUCash to work with their accounts. Well I like databases too, so…

    I decided to use SQLite to make things easier, changed my file format, and opened up the file in DBeaver. The database was a bit convoluted but not crazy, and I tried some SQL snippets I found online to see how it all worked. Then, I wrote a script to export all expenses into a CSV file — it worked like a charm, and I was able to build a pivot table in LibreOffice Calc in like two steps.

    The only person who will ever care is me, but I do like to open the spreadsheet occasionally, and just admire it.


  • Maker Space

    Happy May Day!

    Though I’ve been using my new laptop almost exclusively this past month or so, I’d let the final setup tasks fall by the wayside — not abandoned, just on the back burner for a while. But then, over the last few days, I made some real progress:

    My Header Calculation Program

    I moved the program over to the new machine a while ago, but it wouldn’t run (not even to just give a version number and exit), with an error message saying that it couldn’t find the MXML library. I tried setting up libmxml and ran into another other issue: my code was compiled to a 32-bit architecture (two laptops ago), and the new laptop wouldn’t let me use th 64-bit mxml library with the old program. (Not sure how the old laptops let me get away with it.) The obvious answer was to recompile, which was something I needed to do anyway for some parts of the program, to make it compatible with the new database configuration.

    I got libmxml installed properly, ran make, and as expected I found some errors. I needed to install PostgreSQL’s libpq library, which wasn’t too hard, and after that make ran fine, and so did the program itself. It was kind of cool to run the thing, but ASME header calculations really are something I have no longer have any use for.

    That was Wednesday.

    My Local Web

    Today I got my web server configured to display and run my internal website. I got the server up and running a few weeks ago, but I was dreading this next step — it turned out to be more straightforward than I expected; the only hangup was getting PHP installed, which took all of a minute… And now I have my internal website back, including what I expected to be the most difficult part: my LV commuter map. Granted, I’ll probably have to Marie Kondo my way through the place to get rid of all the old clutter, but that’s a task for another day.

    Most of what I did before this week was just moving files, but these were both firmly on the “porting software to a new system” side of things. What’s left for the new laptop? I will likely set up my background soon, to be like the old laptop — right now I kind of like the current dark generic background though, so we’ll see. And then I should be done!


  • More On The New Toy

    So here I am, posting at home from the new machine. I have it mostly set up the way I want it: photos, music, GRAMPS genealogy are now installed — these all required moving database files, but the transfers went OK. The desktop is mostly the way I like it, and I’m actually using it right now to pay bills today (sigh).

    I’m slowly finding out more about this laptop too. Most interestingly, it has no Ethernet port, no power port (you use one of the USB-C connections), and there is a microSD port rather than a regular one. I guess times change… but there are still two USB-A ports along with the two USB-C “thunderbolt” ports, so I guess things also stay the same.


  • Touching Base

    Man, where to begin…

    I guess the first thing to say is that I usually stop posting when I’m blocked by news in my life, usually bad news, that I don’t want to share yet. I can’t think, or write, about anything else until I get it out of my system, so all writing gets blocked for a while. This has been happening for a while but the latest tale can now be told, to wit:

    This isn’t really my story to tell so I’m deliberately being a bit vague, but my son-in-law had a major health scare. He needed some major surgery, but is recovering now and the surgery seems to have done the trick. We’d all been under a great deal of stress until we got the good news from the hospital, now maybe a week ago. The major problem was found while the doctors were investigating a less severe (unrelated) problem he has, so now he’s back to square one on the original issue, but things are looking up.

    Meanwhile, and I might have mentioned this in passing already, but here’s some good news: Ben and Jennie are expecting — the baby will be here sometime around the beginning of August. We are all over the moon. They also got a new apartment, only a few blocks away from us, and are both now busy teaching.

    Laptop Update: My current laptop is suddenly showing signs of physical wear. It’s mostly a problem with the hinge — the electrical connection to the screen seems to be wearing, and the screen blacks out unless the lid is in just the right spot. So, I bought a new laptop this week. I want to go with Linux Mint, and was thinking of getting a DELL or even another System76, but really I was leaning towards Lenovo, and eventually settled on a Yoga 7.

    This is basically a commodity laptop, pretty straightforward (except for a touchscreen and the hinge’s extra flexibility): 16GB RAM, 1TB storage, Intel CPU and GPU. Not bleeding edge by any means, but at least as good as my old laptop and (most important) it feels physically robust.

    I wiped the drive and installed Mint, which was a bit of a nail-biter but mostly went smoothly. Installed a ton of my favorite software, got my databases up and running, got QGIS going & migrated my projects, and I’m now working through migrating my music/photos and local website. I have a lot still to do but the laptop is now fully functional — I walked with it across the river to a coffee shop, and spent the afternoon configuring software and browsing.

    This afternoon is the No Kings protest in town, and I’ll probably take one of the bikes out for a ride tomorrow.


  • Goodbye Old Friend

    Posted on by Don

    Every end is a new beginning.

    — Captain Cloud

    So my old printer finally bit the dust. It was an HP PSC2175, a combination color printer/scanner/copier that I got in probably 2000. It was pretty snazzy for its time, and even until it finally broke it was extremely useful. (The only technology it really lacked was Wi-Fi, though it did have a bunch of weird, semi-proprietary camera memory chip ports, and a USB connection that made Linux-early-adopter me learn a few things.)

    The printer started having trouble a few months ago, then finally went belly-up in early June: whenever it was turned on it would just start making sounds like a ratchet or gear was slipping. The Internet told me that this was because some internal parts needed cleaning, but neither I nor any repair place I called would do it. So, I started looking for a replacement.

    I finally replaced it last week, with a Brother MFC J1010DW, essentially the same printer/scanner/copier I had before, except it now also has Wi-Fi connectivity (and it’s not Hewlet-Packard, my only other criterion).

    I’m surprised that I feel a little down about getting rid of the old printer. It really owed me nothing at this point, but I had it for so long and it had been a reliable workhorse all that time, I feel like a part of my life has slipped away. It’s still up on the desk for now though, I can look at it any time I want until I finally recycle it.

    By the way, this is what I was writing twenty years ago, and this is what I was writing fifteen years ago.


  • A Thousand Wordles

    Posted on by Don

    So yesterday I did my thousandth Wordle, and I paused to look at my stats:

    GuessesQuantity
    11
    245
    3375
    4416
    5134
    619
    Fail (the “seventh guess”)10

    My final average was 3.73 guesses per Wordle.

    I’m not sure if this the end of the line for my Wordling, or just a milestone — I’m guessing the latter, because I did another one this morning.


  • A TIL Moment

    Posted on by Don

    I have no idea how this happens (or, if it’s nefarious, what is supposed to be accomplished by doing this), but I discovered, about a week ago, that some other domain was aimed at my IP address — as in, you type in their website name, and it goes to my site.

    I found this out when I was doing a little security check-up, and noticed the other website name (which was, basically, almost-random-string-of-letters-dot-com) among the logs. I Googled it and the results showed snippets from my site. Hacked!!

    Well not quite: some further Googling explained what was going on (but not why). I also found that when I tried to actually go to the other site my browser refused to load it, because the SSL credentials (for my site) did not match the bogus website’s hostname. Thank you SSL!

    According to my Googling there was nothing I could do to prevent someone from aiming their site at my address, short of contacting the bogus site and asking them to stop (fat chance), but I could configure my site to throw a “Forbidden!” error at anyone coming to my site from any other hostname but mine. So now my site won’t load from that host, even if someone decides to ignore their browser’s security warnings.

    What did the trick was a little snippet added to my site’s root htaccess file:

    <IfModule mod_rewrite.c> 
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTP_HOST} !^donkelly.net$ [NC]
    RewriteRule ^ - [F]
    </IfModule>


  • An Addition To The Website

    A New Page!

    I just added a page with links to some of my Sals maps; you can also find it in my “other projects” menu. I’ll be improving and adding to it as time goes on, but there it is for now.

    I was hiking at Sals the other day and bumped into Eric riding with a few others; they asked me what I was doing and I told them I was tracking down the last of the trail marker posts, to add to my map.

    Eric was like “uh, what map?” and I said I’d been keeping a map of Sals for decades, so he of course asked me where he could find it — and that was the motivation for starting my new page.


  • Improved Wordle Cheating

    I use a script to help me with Wordle — creating the script, and watching it work (rather than the actual play itself), are what I like most about playing Wordle.

    My script works, in conjunction with a text file of the most common five-letter words, by counting the most common letters used in whatever subset of words are valid at any point in the game — part of the script runs the text file through a regular expression filter to get that valid word list — then rating the words by how many high-count letters they contain. This especially is a good tool early in the game, since it helps to either confirm or eliminate the most obvious letter choices right off the bat, but it has diminishing returns with later choices.

    I modified the script to similarly score multiple-letter combinations, but the results were mixed. Past a certain point, this approach really doesn’t do much, and adding letters didn’t change that. My average score hovered at basically just below four guesses per game…

    The “wordle bot” assistant has its own way to assess words, based on a “divide and conquer” approach: the results of each word selection basically split the potential words into several groups, where all the words in each group would have produced the same result if they were the answer. (I call the groups “buckets,” and the approach the “bucket method.”) The more buckets a word choice can split the potential words into, and the fewer words are in each bucket, the better that word is for zeroing in on the correct answer.

    I decided to try using this approach, writing a python script to do the work. It really was pretty easy, surprisingly so, and it worked really well so I added some sorting to it and incorporated it as an option into my original helper script.

    The results, again, have been mixed. I think my average score is now closer to 3 than 4, but I’ve also had a whole lot more fives (and some more twos) so the variance seems to have grown. My “skill” score went up, but my “luck” score dropped… Part of this (especially the “luck” part) is because I’m not selecting words as randomly, or weighting the odds like my old method did, so I now start with my go-to choice of “SLATE” (always, for luck), then use my original wordle-helper method to find the next word, and from there I use the new bucket method. Better, but still not great.

    It turns out, the new method is a bit more sensitive than the old one to unusable words in the word list. Wordle has a fairly large set of acceptable words (I think I saw somewhere that it was about 3000), but only a subset (say 2000?) can be winners, and none of them are plural (no ending in “S”), past tense verbs (mostly no ending in “ED”) and definitely no inappropriate words. There are may be other deal-breakers too, but that’s a pretty good set of exceptions. Meanwhile my potential word list, which comes in at over 5000 words, contains all of those and more.

    So I’ve been curating my list. I added some regular expression filters to avoid words ending in “S” or “ED,” and marked as many inappropriate words as I could find so they would not get considered. My results are now much better, though there are still a few words that my list considers common but the NY Times does not.

    Today’s score was a five, but I just had a long run of threes.

    About my choice of “SLATE”

    Even before I first wrote my wordle helper, I decided that “SLATE” was the best opening word, since it had what I thought were the most common letters, and the best combinations, to start the game. I’ve been using it ever since, and at some point I felt vindicated when the wordle-bot started using it as its own best starting word. Everyone else started using it too, but then the bot began to start with “PLATE” and my word became far less popular…

    Well, I was playing with my new script, running it for a starting word (that is, with no restrictions except plurals, past tense and cusses), and the best choice by far was “SLATE.” I feel vindicated again, though I don’t yet know why “PLATE” is the current opener of choice for the bot.