Setting up a Kobo without logging in

My trusty Kobo Aura One recently died on me, and I replaced it with a Kobo Libra H2O, which…is honestly kind of a downgrade. I didn’t expect to like the physical buttons, but I’ve come around to them, and the screen is crisper, which makes reading small furigana easier, but the screen is also smaller and the storage size is pitiful (8gb compared to the 32gb I used to have, which is pretty important if you’re going to have a lot of manga on board). In any case…

The main thing I’ve been unhappy about with this new device is the fact that the database handling seems to be really flaky. I had my Aura for four years and never had a problem with it, but this new one has randomly corrupted its own database multiple times over the last few days. Since the only way to fix this is to reset the device and logging in is a hassle (especially since I don’t use any of the online features anyway), I wanted to figure out how to bypass the sign-in process entirely.

There are a few guides on the mobileread forums on how to set this up, but they’re all pretty old — the user database table was only five columns back then and it’s now at 27, which breaks the insert statements. Here’s an updated sqlite script that gets you into the device with minimal fuss:

insert into user
  (UserID, UserKey)
  ('-', '-')

The other steps are the same as ever:

  • Connect the ereader to your PC
  • Tap “Set up via USB” on the home screen
  • Download and run SqliteBrowser
  • Click “File/Open Database”, browse to your ereader, and select .kobo/KoboReader.sqlite
  • In the “Run SQL” tab, paste the above script and execute it by pressing F5 or clicking the play button
  • Click “File/Close Database” and save changes
  • Eject the ereader from your PC and disconnect it

You should be met with a fresh clean dashboard. One nice thing about this method is that the ereader never actually sees the internet, so it can’t download book suggestions. I recommend backing up the sqlite database after you set up your preferences (the calibre plugin Kobo Utilities can perform a backup automatically every time you connect the device, which is something I wish I had done much sooner).

Japanese reading report

I started off the week by finishing わたしの幸せな結婚, which I believe only took me another day or two since my last report. The last chapter didn’t really accomplish anything major in terms of story but it did wrap everything up nicely. There are more books in the series but apparently it was originally written to be standalone, so I don’t think I’ll run right out to continue it. I liked the ending and didn’t feel like it needed to continue.

Early in the week I read vol. 1 of 進撃の巨人, since I ended up binging all of season 4 (using english subtitles with my sister so it doesn’t count) and was VERY disappointed in the production quality and needed to cope. I’ve been planning to read through the whole series at some point so this was as good a kickoff as any. I learned a new grammar point (feels like a really long time since that happened), てまで, which I was able to figure out by context but later looked up out of curiosity only to find that it’s considered to be N2, not N1 as I expected.

Throughout the week I read up to chapter 3 of 異世界食堂, which is going pretty smoothly when I can find the motivation to read it. For whatever reason I’m just having trouble setting aside time for it. It’s been so long since I saw the anime that I totally forgot some of the nonsense they get up to — like writing 杯 and giving it furigana meant to represent the language of the person whose perspective is currently in use, or just completely using a made-up word to refer to “onions”.

I finally got around to 戦隊大失格 vol. 1, which is the new series from 春場ねぎ(五等分の花嫁)and I’m liking it a lot so far. The basic premise is that some alien invaders came to earth and got rebuffed by the local Sentai troupe…who cut them a deal of “if you agree to keep this up, we won’t completely wipe you out”. So the current arrangement is that the invaders are stuck on earth, unable to leave and forced to participate in a perfunctory battle every Sunday afternoon, while the “Dragon Keeper” Sentai squad prop themselves up into a huge media empire. The main character (an invader who’s gotten sick of all the song and dance) goes undercover to infiltrate the Keepers and ends up falling in with two unlikely allies(?); a girl who wants to topple the Keeper empire because the battles are boring, and a guy who dreams of a world where humans and the invaders can live in peace. I’m kind of getting Spy Family vibes with the whole “playing both sides” angle and the writing has been really fun so far. Looking forward to continuing the series.

Today I (re)watched five episodes of 四月は君の嘘, which I think I got about halfway through a long time ago (with subtitles). Planning to watch the whole series over the next week if I can. It’s been pretty smooth; even the more technical lingo associated with the music industry has all turned out to be stuff I learned a long time ago from 響け!ユーフォニアム.

Finally, I finished ending A of Nier Replicant with a total of 23 hours (my estimate last week was way off). I’m going to count this towards my goal of five games cleared this year, and will count the other endings as one additional game collectively if I decide to finish them. From playing Automata I know there’s going to be a lot of extra content past the original ending, but honestly this game never really grabbed me and I thought the whole final act was pretty bad.

Six Tanuki and Transparency

Last year I started playing Animal Crossing: New Horizons in Japanese as part of my daily practice routine. It was my first experience with the series so all the characters were new to me, though I did know ahead of time that, just like in Pokemon, Ace Attorney, and other many titles with a long history of western localization, all the characters would have completely different names between regions.

Continue reading →

The nested factory pattern

When writing code, I try to structure my project in such a way that it’s impossible to misuse. I often run into cases where I need some class to be responsible for instantiating and managing its own resources, such as a message hub (which needs to maintain a list of subscribers) or a tweening engine (which would need to update and dispose of tween control objects according to a timer). In these cases, I like to ensure that these objects can never be created outside the class which manages them.

A simple solution, of course, is to use internal constructors, but I personally prefer to avoid using the internal access modifier whenever possible, as I find it does a poor job of signalling the intent of the code, and in many cases is just a band-aid fix for a poorly planned access scheme. Furthermore, in cases where the class in question will only be consumed within the same project, internal is essentially no different than public.

My solution to this problem is as follows:

Continue reading →

Haxe still has problems

Following up from my post about using Haxe/OpenFL to save some of my old Flash games, I do feel like I have to talk about some frustrating points that came up during the progress.

I will preface this by saying that the problems Haxe has now are different than the problems it had when I was using it previously. Throughout this process, I only came across a bare few instances where switching targets led to suddenly broken code. The OpenFL runtime never totally crashed on me like it used to do. I didn’t have to fiddle with DCE flags to prevent my code from being erroneously stripped from the build. It’s obvious that Haxe has improved a lot over the past few years, and that’s great. I do plan on continuing to use it to port my other game projects, and I would recommend it to anyone else for the same purpose. I do believe in criticizing the things we love though, so let’s get into it.

Continue reading →

A week of Haxe

It’s been a long time since I used Haxe — my last commit to the Iridescence repository was over six years ago, and I haven’t been back to it ever since. When Flash finally reached its end-of-life and my old Flash games suddenly became unplayable, I realized that this would be a perfect opportunity to get back to it, see what had changed, and do a bit of digital preservation work while I was at it.

Continue reading →

Iridescence Walkthrough by To Ta

I somehow missed this when it first came in, but the page for Iridescence received a comment that linked to this walkthrough video. During development, I put a lot of effort into the visual design of each component so as to not require any text on the screen, which apparently paid off seeing as the title of this and other videos on the same channel are in Japanese.

While I never expected Iridescence to be a great critical or commercial success, it’s always nice when somebody stumbles across it and seems to enjoy it.

Now that my blog supports Japanese characters I can finally start posting the reading reports I’ve been accumulating. Over the next few days, a large number of posts will be back-dated across the last year and a half.

These reports were originally intended for 日本語と英語, a Discord community for people learning Japanese or English.

The long drought

It’s been about four years since I’ve posted regularly on this blog, and the reason is as simple as it is uninteresting: I really didn’t have that much to say. My former job, which dealt with anti-money-laundering and financial compliance, had me under heavy NDA to the point where I couldn’t discuss any details about the technology we were working with, let alone the day-to-day. We were in a continual state of slipping behind; always pushing back against management in an attempt to stop incurring technical debt, and always being rebuffed. It was a vicious cycle that I fed into by being willing to work extreme hours at the cost of my own mental and physical health — which only served to embolden upper management as they saw that we were capable of “working miracles”.

During this time of working long hours and fighting to keep RSI at bay, my motivation to work on personal projects was at an all-time low. I released the odd update for Glide but besides that, I did very little coding at home. Not only was I unable to write about my professional work, but my passion projects were so neglected that there was nothing to write about in the first place.

Something had to fill the gap left by my hobby programming, and by happy coincidence I had begun studying Japanese around the same time that I started my job. I made lots of missteps the first two years (more on that in a later post), but at around the two-year mark I had a breakthrough and started reading extensively, which turned out to be incredibly effective. I’ve been part of a reading club for over a year now (and have submitted a reading report every single week), but when I tried to crosspost my reports here, I found that my ancient WordPress install was still using a latin database charset and everything I typed would show up as ????????. Unwilling to risk losing my existing posts, I left it alone.

Last night I bit the bullet, nuked my entire website and reinstalled WordPress fresh. Fortunately my posts imported without issue (though some media references are still broken).

Since leaving my job I’ve had a lot of free time to work on personal projects; watch this space more details on that front. And with a shiny new database that supports non-latin characters, I should have a lot more freedom to write about what’s been going on with my life lately.


Glide update: Tween overwriting

I’ve just added support for property overwriting to Glide, my Tweening engine for C#. This functionality exists in Actuate (a great Haxe library from which I’ve taken a lot of inspiration) and I’ve wanted it in Glide for a while now because it’s just so darn handy.

Imagine you start a tween off on its way:

// move image to (100, 200) over five seconds
Tweener.Tween(image, new { X = 100, Y = 200 }, 5);

…but then something changes, and now you want your image to travel instead to (X = 500) instead, and it should only take two seconds:

Tweener.Tween(image, new {X = 500}, 2);

At first this will work fine, but when the second tween finishes, suddenly the first one takes precedence again and your image will keep moving towards (X = 100). You could cancel the first tween, but that would also cancel the movement towards (Y = 200).

Now, creating a new Tween on an object that’s already being tweened will cancel the movement of any properties that are currently being tracked. In the example above, the new X tween would overwrite the old one, the original Y tween would keep on working, and there’s no need to manually cancel anything.

The old behavior is still available; just pass false to the overwrite parameter. I’m pretty sure that won’t be necessary in the majority of cases, but it does exist if you want it.