Fifteen years of blogging

Trivia entry for the week: Yesterday this blog apparently celebrated its 15th year of existence.  It looks like the first entry was February 18th, 2005.

I say "looks like" because the publication date actually says December 14th, 2006.  But that's almost certainly an artifact of the way the first versions of LnBlog stored date metadata - they didn't.  The date at which an entry was "published" depended on the file path.  Since storage is file-based, each entry goes in a folder like entries/2005/02/18_1200/, which corresponds to the date and time that I hit the "publish" button.  That part of the system actually hasn't changed in the last 15 years, but what has changed is that the publication date is now stored in the entry metadata, along with everything else.  At some point (presumably in 2006) when I added the date to the metadata, there was apparently a bug in the code such that it didn't properly fetch the publication date from the path.  So a bunch of early entries actually show the wrong publication date.  I should probably fix that at some point.

Despite the fact that I have few to no regular readers, I'm slightly proud of myself for sticking with this blog this long.  My level of posting consistency has varied radically over the years, but I've always come back to it, for at least a few posts a year.  There's something to be said for that, though I'm not sure exactly what.

I'm also slightly proud of myself for keeping this blog more-or-less working that long.  It's powered by LnBlog, which is the first real PHP program I wrote, starting in late 2004 to early 2005.  I wrote the entire thing myself, from scratch with no framework, starting in PHP 4 and now evolving into PHP 7.  And it's actually got a fairly decent feature set, so I consider it a minor accomplishment that it's still working.

For the last couple of months, I've been trying to do the weekly post thing, taking advantage of the "scheduled publication" feature to write things in advance and automatically spread out the publication.  This week is actually the first one in a couple of months that hasn't had a Saturday post (mostly because I was getting ready for vacation and didn't get around to writing anything).  We'll see how long we can keep that up.  But hopefully I'll be able to keep some level of consistency going for another 15 years.

OK, that one wasn't good either

In my review of Star Wars: The Rise of Skywalker a few weeks ago, I mentioned that I'd enjoyed the other new Star Wars movies, with the exception of Solo: A Star Wars Story, which I hadn't seen yet.

Well, I saw it.  And...yeah.

On the up side, it was definitely better than The Rise of Skywalker.  But that doesn't make it good.  That would be like saying that Anders Breivik wasn't such a bad guy because he killed fewer people that Stalin.  It doesn't work that way.  So it was pretty bad.  I'd rank it as the second worst Star Wars movie so far.

The disappointing part was that for the first third to half of the movie, I was enjoying it.  It wasn't fantastic, but is seemed like a decent, straight-forward action/adventure movie.  I distinctly remember thinking, "I don't know what people were complaining about.  This is actually not bad." 

Then in the second half the story started going down hill.  They started throwing in plot twists and flipping the "good guys" and the "bad guys" and it just didn't really work.  Especially since a lot of the "good guys" were career criminals - are we really surprised they're not so good?  Come on.  Add in the corny dialog and some iffy acting that left the characters feeling unrelatable and that just killed it for me.

And then there were the parts that seemed like they were supposed to be some form of ham-handed social commentary.  For instance, Lando's droid that was constantly agitating for droid rights.  That could have been an interesting sub-plot.  Are droids really sentient?  What does sentience actually mean?  And if they are, why doesn't galactic civilization have a problem with basically enslaving them?  And for that matter, why don't they seem to have a problem with enslaving humans or other humanoids?  How do the characters relate to these questions?

But no - they don't even try to explore any of that.  They just have the droid assert that droids are sentient and need to be liberated and then walk around ranting about it like that friend who spends way too much time on Twitter and won't stop talking about politics.  "Yeah, we get it Bob, the patriarch is bad.  Now what do you want on your damn pizza?"  It ends up just being a punchline.

Bottom line: if you haven't seen Solo, don't bother.  My only consolation was that I was cleaning the house while I watched it, so at least the time wasn't wasted.  If you want a good Star Wars story, go watch season 1 of The Mandalorian.

Obscure reading choices

You know you're getting obscure books when even Goodreads doesn't know what the heck you're reading. Or maybe it's less that it's "obscure" than that it's "old".  And French.  It's hard to tell.

The cover of "The Nature of Hinduism"In this case, the book in question is "The Nature of Hinduism" by Louis Renou.  This is a book that's been sitting on my bookshelf for literally years.  I'm not even completely sure where it came from.  It has labels from the local high school library, so it apparently originated there.  I think either I got it at the public library's book sale, or it was left in our house and I found it when we moved in.

Anyway, Goodreads had no idea about this book.  It had a handful of entries for the author, but that's it.  So I had to add it to Goodreads.

This endeavor started off poorly because I decided to do it on my phone.  It turns out that the Goodreads mobile app doesn't actually have a way to add new books.  Neither does the mobile website.  The app has a feature to scan the barcode, but this book is 50 years old - it doesn't have a barcode.

If you want to add a book, you need to use the desktop site, which is a pain when you're using a mobile device.  Of course, once you're on an actual computer, it's pretty easy.  There's a "Manually add a book" link right on the search results page and it's fairly easy from there.  Some of the fields on the add form are a bit obscure, but most of them are optional anyway, so it's not a big deal.

I must admit I'm a little curious as to how much use the "manual add" page actually gets.  I'm sure it's not the most commonly used feature by any stretch of the imagination, but I would have expected it to be common enough to merit a link on the mobile site, if not the app.  Am I the only person left who reads used books that old?  That seems depressing.  Perhaps it's just that people who read old books tend not to use Goodreads.  I can only hope.

Sudoku on Linux in days past

Here's another "from the archives" post that's been sitting in my drafts folder since March 27, 2007.  At the time I'd been getting into playing Sudoku and was running Kubuntu on my home desktop and laptop.  All I wanted to do was play Sudoku on my computer.  And apparently it didn't go very well.  At the time I wrote:

Why is it that there don't seem to be any good desktop sudoku games for Linux? At least, I haven't found any that meet my requirements. The three in Ubuntu's repositories sure don't.

My requirements for a sudoku game are pretty simple. Beyond the basics of creating a new puzzle and telling me if I'm right when I complete it, I only want one thing: notes. I just want an easy way to add notes to unfilled squares so that I can quickly reference the possibilities.

You wouldn't think that would be such a tall order. However, of the three sudoku games in the Ubuntu repositories, none of them do this. Gnusudoku doesn't even claim to support notes. GNOME-sudoku claims to support them "simply" by clicking at the corner of a box. However, it doesn't work. Maybe you have to run it under GNOME?

And last but not least, we have ksudoku. This one does support notes, and they do work, but they suffer from the same problem as the rest of this app: the user interface makes absolutely no freaking sense at all. Even this might be forgivable if there were a manual or even some kind of guide on the website, but there isn't. The status bar does flash back and forth between "helpful" tips, one of which says to use "RMB" to make notes, but that's it. It took me a few minutes and some experimentation to figures out that "RMB" is supposed to be an abbreviation for "Right Mouse Button". But even with that, I still can't figure out how the hell notes are supposed to work. I can't seem to get more than one number into a note and things disappear if I right-click too many times.

I assume those problems have probably been fixed by now.  I mean, it's been almost 13 years, so either they're fixed or the project is dead.  But I seem to recall this being sort of emblematic of open-source games at the time: there weren't that many of them and even fewer were any good.

By now, I'm sure that the situation is much better, if only because enough time has passed for more games to mature.  But, unfortunately, I don't really care anymore.  These days I don't want to sit down in front of a computer just to play video games.  I just don't have that kind of time.  If I'm going to play a game, it's the kind that runs on my phone and which can be dropped at a moment's notice.

Coincidentally, one such game that I just downloaded the other day is Open Sudoku, which is actually pretty nice as Android Sudoku apps go.  It's open-source and you can find it on F-Droid as well as in the Play store.  Like most open-source games, it doesn't have a lot of frills or fancy graphics, but it's easy to play and does the job.

Random Python and WSGI tip

In light of the fact that Python 2.x loses, I've been upgrading some of my personal projects that I haven't done much with recently to Python 3.  One of them is a little web-based comic book reader I call Linga (I don't remember why) that I run on my home network.

Since my home server runs Ubuntu 18.04 LTS, where Python 2.7 is the default, this has been a bit of a pain.  Before doing the conversion to Python 3.x, I had Linga set up and working using MySQL and Apache with mod_wsgi.  But once I pushed the code for the 3.x version, everything broke.  After digging in, there were several problems I needed to correct:

  1. The default mod_wsgi install uses Python 2.7, not 3.6 like I want.
  2. My WSGI script uses execfile(), which no longer exists in Python 3.x.
  3. SQLAlchemy can't load the MySQLdb module.

Luckily, the solutions to these problems weren't particularly hard to find or implement.  With a little Googling (well, DuckDuckGo-ing really, but that doesn't have the same ring to it) and a little experimentation, I found the following fixes:

  1. The version of Python to use is hard-coded into the Apache module.  So to use Python 3.6 I just needed to install the Python 3 WSGI module with apt install libapache2-mod-wsgi-py3.
  2. Apparently the recommended replacement for execfile("filename") is exec(open("filename").read()).
  3. It seems that Zen of Python's saying that "There should be one-- and preferably only one --obvious way to do it" breaks down when it comes to connecting to MySQL, as there are apparently several client libraries available.  The solution that worked for me was to pip install pymysql and run pymysql.install_as_MySQLdb() in my WSGI script.  Having to call a method to turn on MySQLdb compatibility is annoying and seems a little hacky, but it works and it's not really a big deal.

With that, Linga now works just fine.  Maybe this will save someone else having to Google the answers to these questions as well.