My son beat his first Switch game

Today we experienced a somewhat significant event: my son beat his very first Nintendo Switch game.  It was Splatoon 3, which he got for Christmas.  He's been playing it since then and just this morning he finally beat the final boss for the first time.

I've never played the game, so I have no idea how difficult it actually is.  However, several times I've seen my son get frustrated and upset because he was having trouble with it.  So it's a life-lesson - a small one, but a lesson nonetheless.  He struggled, he stuck with it, and eventually persevered.  Games can be very useful for that sort of thing.

My son was very happy to finally beat the game.  He called me in to watch the end and called his grandmother afterward to tell her about it.  It was really nice to see him to excited and to be there with him to share this small triumph.  Call it one of the joys of parenthood.

Vim macro recording is really nice

This is probably a big "duh" for anyone who's used it before, but Vim's macro recording is pretty handy.  It's one of those things I've been vaguely aware of for a long time, but never actually used before.  Until now, I really only ever recorded a macro by accident.

But the other night I was playing around with my attempt to learn Go by writing a NES emulator.  I'm working from a demo of writing one in Rust, which recommends having highly comprehensive unit tests, so that's what I'm trying to do.  The problem I'm running into is that this results in lots of repetitive test cases.  The individual test cases are short, usually six to ten lines, and take the form of a struct defining the processor state and expectations.  The thing is, there are a lot of them.  By that, I mean that so far I've implemented 20 of around 150 opcodes and my unit test file is already pushing 1000 lines, compared to about 250 lines of production code.

Now, a 4:1 test to prod ratio isn't necessarily a bad thing, but it does seem a little high.  And the tests are all very similar, so they're kind of hard to read and navigate - unless you know the exact term to search for, they all just blend together.  So I really wanted to condense them down, preferably to one line per test case.  So I finally decided to make a few functions to extract the common stuff into a template so that I can condense all those structs down into one-liners.  Great!  But I already have 1000 lines of code to update.  Not so great.

Enter the Vim macro reorder.  For each opcode, a wrote a function to create the test template.  Now I had to take the existing structs and convert those into function calls.  Unfortunately, this was too complex for a simple substitution and it was just too tedious to do that many by hand.  However, the exact same series of steps could be repeated for each test case, so I decided to look up that macro recorder that I've been accidentally turning on for years.

Turns out it's super simple.  You just start recording by using "q" with a register name (e.g. "qa") in command mode, do a bunch of stuff, and then run "q" again to stop.  Then you can execute the macro with "@" and the name, e.g. "@a" and repeat that with "@@".  By itself, this is not terribly remarkable.  But with Vim movements and actions, it's really easy to make a macro that performs a complex manipulation on structurally identical blocks of text.  So I was literally able to start recording, just do the manipulation like I normally would, and then stop recording, leaving me with a macro that works perfectly with basically zero extra work.

Like I said, nothing really new or ground-breaking here.  Just discovering one of those handy features that I've never really used before.  But now I know how to take advantage of that for future use.

New keyboard - and not the computer kind

Earlier this year, I decided to treat myself to a new keyboard.  No, not a replacement for my UHK, but a digital piano.  Specifically, a Roland FP-30X, the white one, complete with stand and pedal bar.

I got the idea from a music shop in the Colonie Mall in Albany.  We stayed at a nearby hotel on the way home from our vacation this summer and were walking around the mall to stretch our legs after the long drive.  The shop had a bunch of digital pianos set up, and the FP-30X was one of them.

I tried a out a few and quite enjoyed playing the Roland.  The main attraction was the keyboard action, which was very realistic - much closer to a real piano than most keyboards I've tried.  The keys were well weighted and, even though they're plastic, they felt close to ivory.  It was also pretty compact - only about a foot deep - while still having a full-sized keyboard.  That's actually what made me think about buying one.


Our old upright piano is nice, but it takes up a pretty good chunk of the living room, which is the only place we have to put it.  It's also getting very out of tune.  I mean, it's been very out of tune, but for a long time it was "in tune with itself", i.e. everything was out of tune in the same direction, so if you were playing by yourself, you didn't really notice.  However, that's increasingly not the case anymore.  And that's the piano I learned to play on when I was in high school, which my mother bought second-hand when I was a kid, so it's not exactly new.  I'm not sure how much it would take to get it make into proper tune and repair, but I figured it would probably cost about as much as the retail price of that Roland keyboard.  So why not just replace the piano with the keyboard?  It would probably cost the same and it's small enough to fit in my office, so it fixes two problems at once.

So that's what I did.  I bought the keyboard a few months ago.  It fits comfortably against the back wall of my office.  I even got a matching bench to go with it.  And we just got rid of the old upright today.  My wife put it on Facebook marketplace and a very nice couple took it off our hands for their daughters to use.  It served me well for many years and I hope they enjoy it.

But back to the new keyboard.


I already mentioned that I really like the action and feel of the FP-30X.  I'm no audiophile, but the sounds is pretty good as well.  The maximum volume level is just about what I would expect for a "real" piano and the internal speakers project the sound well.  But one of the "killer features" to me was the plain, simple headphone jack.  (Actually, there are two - a 3.5mm and a 6.35mm, if I'm not mistaken.)  One of the main down-sides of the old acoustic piano was the fact that you can't play it while people are using the living room or trying to sleep.  I mean, you can try to keep the noise down, but that doesn't really work all that well.  But with the Roland, I just plug in some headphones and now I can play after my son has gone to bed.  It's great!

The one thing that's kind of a mixed blessing about the FP-30X is the control scheme.  As you can see from the picture, there's no display of any kind and there aren't exactly a lot of buttons either.  On the one hand, I really like this from an aesthetic standpoint.  It makes the unit look more like a musical instrument and less like something they pulled out of an air traffic control console.  But on the other hand, that makes it a little awkward to change the settings.  Of course, you can configure pretty much everything using just the keyboard, but that involves combinations of holding down control buttons and pressing specific keys.  It's weird and you really can't do it unless you have the reference sheet right there.

However, the preferred control method is Bluetooth.  The FP-30X supports MIDI over Bluetooth, so you can pair the piano to your mobile device and control it using Roland's Piano App.  The app itself is...fine.  The interface and control scheme is decent, but not remarkable.  The pairing and connection is sometimes a little slow and doesn't always work the first time, but it does work as advertised and it does allow you to twiddle with all the settings of the keyboard.  It also includes some paid extras, like downloading sheet music in the app and things like that which I haven't played with much.  However, using the app to control the more advanced features is definitely preferable to using key combinations.

If you want to read more about the Roland FP-30X, I found this review very helpful and informative.  Honestly, a lot of the details there went over my head, but the gist is that it's pretty darn good for a budget digital piano.  I just know that it meets my needs well and I've been having a very good time using it to play Christmas songs this week.

New desk

After working from home for the last two years, I finally broke down and got myself a new desk.  This one is significantly smaller than the one in my previous home office setup.  That one was a larger L-shaped desk.  However, I found that I actually didn't need that much space.  The L extension meant that it was hard to reach and hence use the far corner.  I also didn't really have any need for the extension and it basically turned into a dumping ground for random stuff.


This one is much more compact.  That means that, not only do I actually use all of the space, but my office (which is pretty small) feels bigger.

The other big win is that this is a standing desk.  I got a 60-inch by 30-inch Uplift V2 adjustable height desk with the rubberwood surface and I'm very happy with it.  The Uplift desks are fun because there's a lot of customization you can do.  Of course, that also means that the price can vary wildly.  I mean, they start at $600 for a basic 42-inch model, but as you upgrade the size, material, add-ons, etc., it adds up quickly.  The price tag for mine ended up at around $1300.

There are lots of fun add-ons, though.  I got:

  • The casters so I can roll the desk around easily.
  • The bamboo drawer.
  • The upgraded programmable adjustment control.
  • The upgraded cable management system.
  • Three shelves for monitors etc.
  • Two of the powered grommet covers
  • The extra power outlets (so I actually have 2 USB and 6 conventional plugs on the desk).
  • The foot hammock.
  • A standing mat.
  • The bamboo Rocker-X board (with comfort pad), which is surprisingly satisfying.

The assembly took a while, but wasn't too bad.  The main challenge for me was that I had to assemble the desk more or less in-place with the other desk still in the room.  That's because I had no place to put my work setup while I assembled the desk (which I did over a couple of days) and, due to the door and hall size, the new desk couldn't easily be moved into my office after it was assembled (it would have to be turned on one edge, and that's a two-man job).  However, the instructions were fairly clear and the assembly wasn't too difficult.  There were a few steps where I needed to drill holes in the underside of the desktop, but other than that it was pretty much just screw drivers and Allen wrenches.  It takes some time, but it's not especially complicated - though some of it depends on what add-ons you get.

So if you're looking for a standing desk, the Uplift V2 is a good choice.  And if you've never used a standing desk, you might want to look into it.  I find that it really does help.  With my old desk, I sometimes found my legs starting to get stiff or cramped from sitting too long.  But if I get up and walk around frequently, that can sometimes interrupt my flow and make it harder to get things done.  A standing desk is a good compromise, because you can keep working, but still stretch your legs and move around.

I also found that the combination of the standing mat and the Rocker-X board really helps.  Just standing on the hard floor can be better than sitting, but it's still not super comfortable, especially if you're working at home and not wearing shoes.  The standing mat gives you a nice cushion, which makes standing for long periods in socks or bare feet much more comfortable.  And the Rocker-X board, while it looks like a silly gimmick, is awesome, especially if you're a fidgeter like me.  Even when I'm sitting, I'm constantly moving my legs and feet around.  The Rocker-X board lets you shift your weight and move your feet constantly, while still keeping you in a position where you can work.  I highly recommend giving it a try.

Belated birthday post

This year's birthday post is a few weeks late because...well, I just didn't feel like writing it.

There's not much to say anyway.  We spent the week on vacation in Cape Cod.  We rented the same place in Hyannis that we stay every two or three years.  It's a nice spot, about a mile from main street and a two-minute walk from the beach, and the weather was very nice this year.

I had a fairly restful and uneventful birthday.  It was kind of a re-run of 2019, which is the last time we were in Cape Cod.  I spent a while wandering around Parnassus Books, though nothing really struck my fancy - all I got was a couple of Zane Grey novels.  We followed that up with a family lunch at the Flashback retro arcade and bar and then some mini-golf and a tasting at Barnstable Brewing (which are actually right next to each other).  We finished the day off with a delicious taco dinner at Añejo Mexican Bistro and some cupcakes from Little Miss Cupcape.

That's about it.  Just some good food and some fun activities with the family.  Nothing terribly exciting, but a good day none the less.