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 support...now, 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.

UHK case

If you saw my review post, you know that I have an Ultimate Hacking Keyboard.  And that I love it.  It's an awesome keyboard.  In retrospect, I wish I'd ordered two of them at the crowd-funding price.

Over the holidays I took some time off and wanted to take my UHK home.  Because, you know, maybe I'd have a chance to actually use it.  The only problem with this is safe transportation.  My UHK has palm rests and I keep it in a "tented" configuration, i.e. split with the inner portion elevated.  To fit it back in the box it came in, I'd have to take off the feet and palm rests, which requires a screwdriver.  It's not really difficult, but takes a few minutes and it's kind of a pain in the neck to do.  This is actually the only thing I don't like about the UHK - you can't reconfigure it without changing a lot of screws.  (Though on the up side, the fact that things are screwed together makes the entire rig feel very solid.)

What I really needed was a carrying case.  Unfortunately, they don't sell one on the UHK site.  I briefly considered trying to make one, but wasn't sure I had the proper tools and, realistically, there was almost no chance I was going to find the time to do it.  Luckily, the UHK blog did the hard work for me and collected a bunch of examples of DIY cases submitted by users.  

My UHK in its new case

I ended up choosing the second option and buying this case.  It's a hard-shell case with some padding on the bottom and egg-carton foam on the top.  It's actually built for some form of min keyboard/synthesizer, but it's exactly the right size and shape for a UHK with the palm rests still attached.  It works perfectly, required zero work, and cost less than $20.

Thank goodness Star Wars is over

My company has this cool tradition - when a new Star Wars movie comes out, they buy everybody a ticket to it.  In fact, for the larger offices, they even buy out a theater, which is really cool.  So, naturally, this year they sent us all to see Star Wars: The Rise of Skywalker.  And you know what?  I kinda wish they hadn't.

Warning: Spoilers Ahead!

I give that spoiler warning even though I don't think it's actually possible to spoil the movie.  Seriously, it's that bad.  If you haven't seen it, don't bother.  It's so bad I think it actually made Revenge of the Sith look good.

Lest I be accused of unfairness, let me clarify that I did not go into this movie expecting to hate it.  I hadn't read any reviews or rumors about it, so I really didn't know what to expect.  I like the previous movies well enough and expected the same from this one.  I thought The Force Awakens was good and while The Last Jedi had some issues, I still enjoyed it.  I didn't see Solo, but I liked Rogue One a lot (in my opinion, it was the best of the new movies by far) and have been thoroughly enamored The Mandalorian.  So I like Star Wars.  But I'm not a die-hard fanboy.  I'm not really familiar with the books, comics, games, or any of the other extended universe stuff - just the movies.  So I'm not looking to pick this apart in light of other sources.  All I'm really expecting is a good movie.  If not a great cinematic masterpiece, at least an entertaining action film.

I did not get what I was expecting.

On the up side, the special effects were top-notch, and the acting was generally fine given what the actors had to work with.  On the down side, everything else about the movie was awful!  The dialog was bad, but that's forgivable - this is Star Wars, not Citizen Kane, so you have to temper your expectations; the pacing was a mess, with suspenseful plot points that were resolved ten seconds later in the very next scene, like when you think Chewbacca is dead for maybe 30 seconds; the action scenes were a mixed bag, with some that were decent and others that were underwhelming, such as the big lightsaber duel on the ruins of the Death Star that actually inducing me to yawn.  But my main complaint was the story.

The plot of this film was just...impossibly bad.  And when I say that, I mean I actually find it hard to believe that it was written and approved by highly paid professionals working for a major studio with a huge budget.  It's the kind of story I would expect from a not-very-talented 13-year-old fan-fiction writer.  It's trite and uninteresting, full of holes and poorly motivated twists, loaded with plot points that don't really make sense, and littered with distracting and pointless "fan service" call-outs. 

Shadiversity has a good break-down of the plethora of problems with the plot, but I'll give a a short list of a few of my complaints.

  1. Palpatine?  Really?  Yes, the opening story roll, in the first 30 seconds of the film, reveals the twist that Emperor Palpatine is still alive and is planning to take his revenge on the galaxy.  It's never explained how he survived the Death Star or why he's been in hiding for however many years.  It wasn't alluded to in the previous movies, as far as I can tell.  But sure, why not?  Apparently they've just run out of original ideas.
  2. Another armada from nowhere?  The previous movies showed us the First Order, which apparently built a huge armada in the outer reaches of the galaxy and then started taking it over.  Well, apparently Palpatine did the same thing.  So now he has a gigantic fleet of Star Destroyers that also all have planet-killing lasers a la the Death Star.  Because...why not?  Apparently those are a dime a dozen now.
  3. Is it really that secret?  Palpatine built this fleet on the Sith home-world.  Much of the first half of the movie is spent trying to find the special navigation unit which will take the heroes to that planet so they can confront Palpatine.  Apparently only two of those units were ever made and they're the only way to get to the planet.  Kylo Ren has one of them and when he finds the planet, it's shown as being pretty much a barren wasteland with one big building (which for some reason seems to be floating about eight feet off the ground).  And yet they managed to build hundreds, if not thousands, of Star Destroyers here.  How?  Where did they get the resources?  And the crew?  So nobody can get there except for the tens of thousands of people who are responsible for those Star Destroyers?
  4. What's with the dagger?  The heroes find the coordinates at which to locate the above mentioned navigation unit inscribed on a dagger.  It must be an ancient Sith relic which will lead them to a long-forgotten temple or something, right?  Wrong.  It leads them to Endor and the wreckage of the Death Star.  So...that means that like 30 years ago, somebody knew that unit was in the Death Star and decided to...carve the coordinates on a dagger?  Why would you do that?  And then it turned out the dagger has some sort of pull-out thing in the hilt that allows Rey to match up exactly where in the Death Star the unit was.  No instructions on how to use that or where to stand to make it line up right - Rey just notices it's there and uses it at a random place.  The entire thing just makes no sense at all.
  5. What about that thing with Finn?  Two or three times they raised a point about Finn wanting to tell Rey about his feelings for her or something.  At least, I assume that's what it was.  It was one of those "he wants to say something, but never gets a good chance" things.  It comes up a few times and then they never do anything with it.  They just drop it and the movie ends without any attempt at a resolution.
  6. What happened to the Force?  The Force was always powerful and mysterious, but the previous eight movies established some precedents for the type of things the Force can do.  And that list did not include healing wounds, teleporting physical objects, or generating enough Force lightning to simultaneously attack an entire fleet of starships!  I'm not saying that new movies can't introduce new Force powers, it's just that this movie really piles them on.  It seems like at this point the Force has become "magic".  It can just do anything, for no reason, without explanation of how or why it's possible.

That's enough for now, but I could go on.  The entire movie is like this.  The characters are constantly doing things that don't make sense, seemingly at random, either to drive this ridiculous plot or as an excuse for some special effect.  And this goes on for over two hours!  There's no character development to speak of and the plot doesn't seem to develop so much as jump around.  It's as if they had a long list of things they were required to include in the movie and just tried to cram everything in without taking the time to make it work.  If it doesn't make sense, well, we'll distract them with this shiny new thing!  After a while, it becomes difficult to actually care about any of the characters or the story at all .  They just don't feel real enough to be interesting.

Overall, I regard this film as a disaster.  It's the first Star Wars film I can remember watching and not enjoying.  It has caused me to officially lose all respect for J. J. Abrams.  There were actually several sections where I actually started getting bored and wished it would just end.  If you haven't seen it, then don't.  It was a waste of two and a half hours.