Boutique Performance

Not a week goes by where a colleague doesn't complain to me about how slow or sluggish some system or piece of software is. More often than not it's the corporate-mandated tools that are being derided for their sub-optimal use of time and resources, but various websites are also starting to get mentioned more often. Sometimes people ask me how they could make these systems faster, whether it's a problem of not enough memory or CPU power, or why managers consistently choose the slowest software while demanding the fastest employees. There's no answer for the last one. The other two, however, share the same response: it depends.

There's no simple solution to improve the performance of software and any attempt to write about possible things to look for and check would be woefully incomplete1. Instead what I tend to do is nod in agreement and ask a couple of probing questions.

What are you trying to do?

This is always the first question, as most of my colleagues are generally trying to accomplish a relatively common task. My employer isn't trying to launch objects into orbit of far-away planets, cure cancer, or model climate change. We're an education company that has for decades subsisted on a combination of Excel sheets and sheer luck2.

How are you trying to solve this problem?

A lot of times when a person has a software problem, it's because they're doing something "the hard way" and can be taught an alternative method of performing the task3. So by better understanding how a person is approaching the problem, the myriad of options that might be available to solve a problem can be whittled down until there are just one or two good options to consider.

Is this a common task?

Common tasks should be programmatically solved. The role of a person is to be the brain and/or heart of an organisation. The role of a computer is to support that person so they can be as awesome as they want to be4.

Have you considered using ________?

This is the question that I generally try to get to if it's possible because I've found that a lot of the more common software tools that people use on a day-to-day basis are big, bloated, and don't always solve the problems a person might have. Some examples of this would be colleagues who have complained about how sluggish Evernote or OneNote has become after their 10,000th note. I can remember two instances where people did not want to use Word anymore because their computers would crash if both Outlook and Word were open at the same time5. Most people have probably had conversations like this at least once in the last year and it's a great opportunity to recommend tools from small and independent software developers who make a living by providing "boutique solutions".

I enjoy recommending tools like Sublime Text, Typora, Coda 2, Sequel Pro, and Mars Edit to people who need to scratch a specific itch6. It's even better when someone tells me they've bought a license for the software, meaning that the small developer — be they a studio or an independent — earned a little bit for their efforts. This is how software should be made.

There are a lot of reasons for why software might be written by a large team of people. Yet as the world becomes ever more complex, I find it's the smaller software shops that put out the better tools that can help us navigate this complexity with relative ease. Sublime and Typora have both saved me an incredible amount of time by being able to handle large files, or crazy-long line lengths, or just running with such a tiny memory footprint that the commercial memory hogs that run alongside these tools are not at all impacted. One of the many things that I hope to see in the future is a little bit of a return to software practices of old, where the goals are not just about completing the task at hand, but doing so with the most responsible use of resources possible. Applications that make genuine use of multiple CPU cores, reasonable amounts of memory, and simple UI language will always be in demand. So long as the people who make that software can get paid for doing so, there will always be a healthy number of creative problem solvers.


  1. When it comes to tracking down performance issues, sometimes an entire day (or more) needs to be invested to determine exactly what the problem is and what options exist going forward. A person can't simply blame a single component in the hardware or the software as applications are rarely "simple".

  2. This is a slight exaggeration, of course. There are a number of mission-critical systems that use SQL Server and Oracle databases, and our online infrastructure is staggeringly complex to support online lessons across the globe.

  3. The number of lives I've changed over the years after teaching someone how to use a pivot table or VLOOKUP or just Ctrl+D in Excel is by no means inconsequential.

  4. Some people don't want to be awesome at their job, and that's fine. There is still no reason for why someone wouldn't want a computer to do a repetitive task on their behalf (so long as it does not put them out of work).

  5. This turned out to be the result of a domain policy change pushed out by the IT department without anyone's knowledge. Yay, IT!

  6. Yes, I understand that most of these are for macOS. I talk to a lot of people who use Macs. I don't know many people personally who live in the Linux world like I do. Mind you, I will suggest switching to Ubuntu from time to time if someone is complaining about Windows or macOS.

Missing Chronology

Last month when someone wanted to find a specific post on my blog they would open the archives page, type in a few keywords, and let the incomplete search mechanism try to find the item they were looking for. If that didn't work, then clearing the filters and scrolling down would show every post in reverse chronological order going all the way back to April 1979. The default blogging theme on v5 works a little differently in that the search box is available on every page and, unlike the previous mechanism, will actually result in a database search. As people had a way to find items on a site, it never crossed my mind to build a page showing a site's table of contents until Larry reminded me.

Whoops.

Fortunately, building a page like this isn't incredibly complicated. The fact that the archives page does not need a search box also means it's possible to change how the page displays information. But how could the information be changed to show things that people might want to see? I thought about this question a bit this weekend and came up with this:

The Anri Archives Page

There were a couple of things that I liked about the previous design:

  1. posts were numered
  2. posts were grouped by month, with the month being a title
  3. grouping was done based on the time zone of the reader, not the author

These three features needed to be brought forward with the understanding that Bookmarks and Quotations would also appear on the archives page. Social posts, called notes, are not visible in the archives as this would be noise. Should there be a need to see all social posts in reverse chronological order, there is always the Notes page.

The previous version of 10C generally cheated with the archives page by presenting a blank page, querying the API for a list of posts with supporting meta data, then building the results. This works in most situations, but can cause some headaches for search engines that do not parse JavaScript or for people using a browser with JavaScript disabled. To help resolve this, archives are now presented in plain HTML and then modified after the fact.

One item I'm not too sure about at this point is the numbering. As the screen capture will show, the numbers count differently based on the kind of object. Articles, bookmarks, and quotations are all shown with an icon unique to their type, and the counter is for that type as well. Does this make sense? Does it matter whether these are split apart at all? Could everything have the same icon, or none at all, with the understanding that clicking the title will bring you to the author's page regardless of the type? I'm not 100% sure. Fortunately, the community on 10C will let me know when something doesn't quite work or needs improvement.

The archive theme was deployed with release 19D150 which is live on the server now. Every site with at least one article, bookmark, or quotation will see the "Archives" link in their navigation menu.

Five Things

After a frantic couple of days last week, I managed to carve out a two hour period this afternoon to just get out of the house, sit on a mountain, and listen to a podcast with my eyes closed. The forecasted rain was nowhere near as strong as predicted, making the isolation quite enjoyable1.

This next week is going to see me work on several important updates to four of my active projects, all of which are built on the same software powering this site. A little bit of me time was necessary, and it also gave me plenty to think about, including:

Planet Hoph

Planet Hopf

I just learned about this representation of the Hopf fibration today. I would have appreciated this 20 years ago when I studied differential topologies, as it would have saved a week or two of WTF? moments.

Thanatophobic?

Far too much of my time (on a human sale) is spent thinking about time on a grand scale and it’s implications. As of this moment, every living entity that we know of on the earth is equally mortal. Some may experience more seasons than others, but we will all return to the earth at some point. Earlier today when I was thinking about Nozomi’s eventual passing I was reminded that I’m not at all afraid of my eventual death, but that if others. When I die, that will be the end of me. I’ve done what I can to ensure family will be taken care of2. It might not be easy for some members of family, but there won’t be anything I can do about it. If others pass away before me, though, then they’re forever in my memory but forever gone. I’ve lived 40 years and only been to one funeral. Silly as it sounds, I am not at all sure how I will react when a close member of my family, be they human or otherwise, passes away. It really bothers me.

Not Appropriation

We can’t seem to go more than a dozen minutes without there being some group of people “voicing concerns” about cultural appropriation and how it’s detrimental to the uniqueness and vibrancy of cultures and civilizations. As an immigrant to Asia, I wonder how much of Japan’s culture I’ve appropriated and whether it’s a bad thing, given that I’m from Canada with dozens of generations of ancestry that hails from England, Ireland, and France.

I have a very Japanese work ethic, often resulting in warnings from family and colleagues about 過労死, which literally means “dying from overwork”. Is this cultural appropriation? Should I feel bad about myself?

I eat with chop sticks and generally stay away from silverware unless buttering toast or eating yogurt. Is this cultural appropriation? Should I feel bad about myself?

I speak, read, and write Japanese to a certain degree. Enough to buy a house and live day to day in the country, anyway. Language is very much a part of culture, so have I appropriated it from native-born Japanese people and sullied it for my own gains? Is this appropriation and should I feel bad about myself?

Or is the entire “cultural appropriation” argument just a straw man for something much deeper that people are unaware of or unable to adequately articulate?

I’ve lived a very Japanese life for much longer than I’ve lived in this country. Ever since I read about the country in the Collier’s Encyclopedia set my father bought when I was young the nation, it’s people, it’s history, and it’s culture have been absolutely fascinating to me. So much so that I boldly said to my parents at the age of 14 that I would live in Japan one day. And here I am. Have I appropriated the culture? No. I have assimilated it and, by doing so, have an appreciation for a lot of what’s been learned. I emulate the parts of the culture that align with my existing beliefs, and I avoid the things I have no interest in.

People have been doing this since before we left the trees. Cultures evolve and borrow from one another. Most of the appropriation arguments that I’ve read, admittedly on left-leaning websites, seem to believe that cultures should operate in complete isolation and be practised only by those with a genetic link to its history, which is pretty much impossible and a recipe for disaster3.

Rain on the Window

Last Friday marked one year since the family moved into our new house, and it’s been quite a step up from our previous living arrangements. One of the more interesting things that I’ve enjoyed about living in this house is the sound of the weather as it hits the exterior walls and windows. Regardless of how windy the day is, it sounds as though a gentle breeze is caressing the siding. Heavy rains sound like the gentle refilling of a modern toilet: water that’s running, but in no hurry.

It’s lovely to just sit back and listen to the house … when the boy is sleeping and background noise is eliminated.

6:15am

This seems to be the new time for the boy to wake up and instantly start talking. If I wasn’t consistently working until 1-to-2 o’clock in the morning, then this wouldn’t be a problem. Unfortunately running on just four hours of sleep a day catches up to a person. How do parents of multiple children manage to work and sleep? Is it a myth that parents get any sleep at all?


  1. The mountain I enjoy sitting on is in the middle of a park. When it rains, the whole area is pretty much deserted aside from a few stragglers like me who just want to enjoy the quiet. There are covered gazebos at various points as well, which makes sitting in the rain possible, so long as it’s not a “Vancouver drizzle”, as the only protection from that is not going outside at all.

  2. In the event of a natural death the mortgage will be paid off, Reiko will receive $150K in cash plus the cost of any funeral, and the boy will get $75K. In the event of an accidental death, the insurance payouts are tripled.

  3. Cultures (and languages) that don’t evolve tend to disappear.

Astronomer slams sexists trying to tear down black hole researcher's rep

(www.theregister.co.uk)

In response to the scientific community's celebration of the publication on Wednesday of the first picture of a black hole, internet trolls painted an even darker portrait of misogyny through an effort to discredit the female postdoctoral researcher, Katie Bouman, who led the development of the imaging algorithm.

This sort of thing confuses me greatly, as a whole bunch of factors need to go into being this upset about something that plays no bearing in a commentator’s life. Is it jealousy that drives the hate? Is it an actual resentment towards anyone with a uterus? Is it self-loathing because someone else put in the decades of hard work to learn, to study, to collaborate, to refine their understanding of an insanely complex natural phenomenon? There is undoubtedly elements of one of all of these at play, plus a whole bunch more I don’t understand, as I’m neither a psychologist nor a very good study of human behaviour.

People who want to hate will do so regardless of what anyone else thinks. It would be nice if they would just do it in silence so the rest of us can enjoy all the amazing things hard-working people around the world are accomplishing.

Gaps

For the better part of six months, I would keep two browser tabs open on my phone and notebooks for nice.social and beta.nice.social. The first site ran v4 of the platform while the beta ran v5. This was sub-optimal, but allowed for a good deal of testing to take place with the newer software in a realistic setting. Earlier this week when a server update took down the v4 service, the decision was made to move everyone and everything over to the new platform because I felt that it was ready despite a handful of incomplete items. As was to be expected, there were a whole lot more gaps in the tool than I had anticipated.

A good amount of time has been dedicated to migrating data and resolving reported bugs over the last three days and it has brought back memories of many other migrations I've done over the years for personal projects, client projects, and with several employers. When things go smoothly, it means that something is most probably wrong. When things are hectic, it means that something's wrong but the people reporting the issues give a darn. Crazy as it might sound, I generally prefer any sort of migration that is going to involve people who give a darn.

Some of the problems reported include missing posts, broken avatars, missing functions, and site routing issues. When something is reported, I write it to an ever-growing list of tasks, making sure to set aside the time to resolve the matter. If the missing or broken item is actively affecting people, then it gets pushed up closer near the top. As of this writing the critical items have been resolved1, and a half-dozen other issues remain. The ones that will be tackled next include:

  • change the font on the Anri blogging theme to a better sans serif font
  • resolve some of the reported CSS issues on the Anri theme
  • enable messages via the OpsBar[2. The OpsBar is the name of the bar that runs along the top of a 10C site when signed in.
  • return a JSON response for an object with a canonical URL when the HTTP header requests a JSON response
  • enable follow/block lists on the social site
  • complete password-protection handling in the Anri theme

There are also close to 1800 blog posts that still need to be brought over, and the podcasts need additional work to ensure all of the meta data is imported and sent properly in the syndication feeds. If all goes according to plan, all of the core items will be resolved on Monday or early Tuesday and then the focus can shift from "Identify and Repair" to "Converse and Extend".

If there's one thing I can take away from this experience, it's that I should really look at having data migrated daily in an automated fashion during the development phase. This would ensure that migration scripts were complete, meaning the actual migration would be done at the full speed of he server.


  1. If they weren't resolved, I wouldn't be blogging.

This gold Porsche got pulled over by German police for being way too shiny

(driving.ca)

Authorities stopped a gold-foil-wrapped Porsche twice and ordered its paint job be removed, because it posed "a danger to other drivers"

I can understand why someone would want to have a car this flashy. When I was in my late teens I wanted to do something similar, having a Mazda MX-5 with an all-chrome paint job. Fortunately I was too young to have the capital required to make that happen, as I’m pretty sure the Canadian authorities would be just as much a downer as their German counterparts.

One day I will own a Mazda MX-5, bit it will likely be tungsten grey or a pearlescent dark blue.

Catch

Every morning the boy and I head out for a walk around the neighbourhood, through some parks, and over some obstacles. The idea is to ensure he gets some fresh air and exercise, but also to explore some of the fun that the world can offer. Today I thought that "fun" might involve bringing a ball so that we could toss it back and forth. Despite his laughter and best efforts, the kid won't be drafted by any ball team anytime soon. I'd like this to be something we can work on together.

As one would expect from a two year old, the boy started to become distracted and wanted to explore some of the park on his own, particularly the various leaves and seeds that were littering the walkways. While he did this, I decided to throw our ball against the wall for a bit. It didn't take long for me to realize that my throwing arm is nowhere near what it used to be.

A Baseball Glove on the Field

It's amazing what a person discovers they miss after a while.

The last time I played baseball or even just catch was at some point in the late 90s. I think it might have been the summer of 1999, but it could have been '97 or '98 as that was when I played on a regional team. Fortunately there are no pictures of me from that time period, as they would undoubtedly look quite bizarre; a tall kid with an average build1 wearing a black Rawlings glove, standing next to 3rd base, and having the longest head of hair in the park. I played alright and occasionally injured people sliding into third with a "too-powerful" swipe of the glove, but one thing that I was quite good at was accurate throwing. So long as there wasn't a need for endurance, I could throw a ball from second base into the strike zone of a ready batter.

Sustained accuracy was hard, though. A couple of times I was asked to pitch and would never finish an inning before being pulled. Accuracy was possible only when there were longer rests between throws. Three to four minutes seemed to be the right amount of time, which is far too long if you're expected to pitch dozens of times per inning. Third base, however, was perfect. Close enough to the action to be engaged, with fast, accurate throws being required just a handful of times each inning.

But that was 20 years ago. Today, while throwing the ball against a wall just 10 meters in front of me, I was hard pressed to get within 10cm of a splotch of paint. Untrained muscles more accustomed to picking up dachshunds and young children ached as they were used differently. Arm fat shifted noticeably. It wasn't at all comfortable.

Fortunately there's still time to train. The boy is too young to realize just how poor my throws are and how out of shape I've become. With a little bit of practice I can relearn some of the muscle training and get back to making some accurate throws. Perhaps by the time the boy is ready to join a little-league team, I'll be ready to join a semi-organized team as well. Silly as it may sound, I'd really like to play ball again.


  1. an average build for the late 90s, which is about half the build of a typical teen today based on the pictures I receive from family.

Neighbourhood Vaccination Day

Last week a postcard arrived in the mail addressed to Nozomi, "care of" me. In big letters the document announced that it was time for everyone to have their dogs vaccinated for rabies, and that pop-up veterinary offices would be set up around the city to make the mandatory shots easier to receive. A schedule showed the nearby community centre would have a vet on hand for one hour today, and I booked some time off at the day job to make sure Nozomi would have her first-line of protection for another year.

A lot of cities in Japan require that non-human members of the family be registered with the local government and must be done so within two weeks of moving. The paperwork is a nuisance, but the city generally makes up for it by making an effort to ensure that every registered animal in the area has the basic set of shots every year at a discounted rate. Today's shot was priced at 3,400円1, which is about 100円 cheaper than one would pay at a vet. The discount is real, though not particularly compelling. What was compelling, however, was the proximity. The vet (mostly) came here, rather than us going there.

Background aside, Nozomi and I made our way to the community centre at 1:30. The weather was absolutely gorgeous and Nozomi was more than willing to trot along at a decent pace as we followed the pedestrian walk that winds through the neighbourhood. Along the way we met a dozen smaller dogs and a good many more larger dogs. It seemed that everyone who had a canine companion wanted to be first in line.

Fortunately there was little need to worry about lineups.

Typically when there are community pop-ups in Japan, I generally plan to stand around waiting for a minimum of half an hour or more. This wasn't the case today. As Nozomi and I walked up to the injection site a vet approached us and asked for the postcard. He asked a couple of questions, wrote some notes on the card, then asked me to sign it. Almost as soon as I was done writing my name a needle came out. The shot was over before Nozomi could even react with more than a quick head-turn.

Once done, I stood in line to pay for the service and pick up the requisite evidence that the little puppy was good for another year. All in all, the walk to the community centre took more time than anything. I'm not accustomed to this level of efficiency when the city is involved. Last spring when we registered her with the city the entire process took 45 minutes and involved writing her name, my name, our street address, the type of dog she is, and whether she's been fixed or not. Things that could really be done online rather than in person in a stuffy office with slow-moving bureaucrats.

As Nozomi took the injection rather well, we went for a bit of a walk to a different park afterwards so that she could enjoy some fresh air and sunshine. The older she gets the more relaxed she seems to become.


  1. 3,400円 works out to about $30.50 USD.

Server Down

So much for my five-nine's of availability1 in 2019. Today I had a couple of minutes between meetings at the day job, so decided to connect to the web server hosting 10Cv4 and install some operating system updates. This is something that I've done hundreds if not thousands of times with various servers over the years. After the installation scripts completed I saw that I was within the 38-minute "lull period" where traffic to the service is generally at its lowest for a Wednesday and issued a sudo shutdown -r now command, telling the server to reboot.

Less than 30 seconds later I was reconnected and checking available storage space when my phone notified me of an issue with 10C. The site was offline. I checked with the notebook and found that the service was indeed unresponsive. The server was running, as I was connected via SSH. Apache was running on the server. The database was also operating well. But no traffic was being received. I checked to ensure that the firewalls were configured correctly, and that the IP address of the server handn't changed2. I cycled the software. I rebooted the machine. I checked error logs, installation logs, and configuration files. Everywhere I looked, the server appeared to be fine.

Cloudflare's Dreaded Error 523

By this time the service had been down for five minutes and a recovery plan needed to be enacted pronto. There were three viable options:

  1. Restore the VPS: This would essentially see me wipe the server clean and start with a fresh installation of 10Centuries. A backup would be pulled down and restored, returning the system to its previous state seconds before the reboot that brought the service down. Total recovery time: 90 minutes.
  2. Transfer 10Cv4 to the backup VM: As one would expect, I have a virtual machine image set up on the same server that is running 10Cv5. The machine could be brought online in less than 30 seconds with the most recent database restored and ready less than 45 seconds after that. I test this process every morning and it consistently takes between 73 and 75 seconds to complete. Once done, I would need to ensure the routing and forwarding was properly configured on the v5 server, which could interfere with some of the Apache settings that allows v5 to do what it does. Total recovery time: 15 minutes.
  3. Migrate v4 to v5: With the virtual server in Osaka slated to be decommissioned in two weeks when the annual service package expires, the v4 service would have to be migrated to v5 in the very near future anyway. One could argue that it's better to rip off the band-aid now rather than buy time and delay the process any further. Total recovery time: the rest of the day.

Yes, I went with the third option.

While it may not seem like the wisest decision given the lack of complete documentation, the lack of notice, and the stunning lack of functional code in various parts of the system, forcing the migration to v5 should work out to be a net positive. There will be more incentive to complete the outstanding items, as if there wasn't enough already, and it will be possible to see how well the home network can handle the traffic. If problems crop up right away, then it will still be possible to renew the VPS service with the Osaka data centre3, set up a newer infrastructure, and move everything over as a single package.

This is the plan, anyways. And with everyone on the same version on the same server, there will be a singular place to read updates rather than the plurality of timelines that has existed for the last eight months.

To the people who use 10Centuries on a semi-regular basis, I am very sorry for the downtime and hassle that will come from changing DNS records, workflow processes, source code, and preferences. One thing is for certain, though: once the migration is complete (along with a little more documentation and coding), people will prefer what v5 has to offer.


  1. Five nines generally means a service is accessible and usable 99.999% of the year, which means the system must be down for less than 315.6 seconds per year. My servers can generally shutdown and reboot in 23 seconds when everything is running properly, allowing for regular maintenance windows for security patches and other items to be installed.

  2. This would be weird, given that the 10Cv4 server is running in a data centre in Osaka with an IP that hasn't changed in years.

  3. 10Cv4 used a 2G VPS with 50GB of SSD for the web server and a 4G VPS with 100GB SSD for the database server.

Briefly Young Again

Nozomi and I generally stick to the same walking routes when we go out together. In the morning we get into the park and head west, where she can enjoy a great deal of soft grass and shade from the trees that tower overhead. In the afternoons we head south so that she can go up and down some hills that are just steep enough to encourage her to work a little harder. In the evenings we walk east onto the baseball diamond where she can enjoy a large expanse of safe, flat land after the sun's gone down. This regular pattern was stumbled upon after several months of sluggish walks where Nozomi would let me know in her way that she wasn't interested in continuing her outdoor explorations after covering about 100 meters of well-trod lawn. She's going to be nine years old next month, and she's clearly less interested in exploring all the smells of the park in one go, which is why we have three routes that are taken at three different times of day.

This evening, as we made our way to the baseball diamond, something in the distance caught my eye. The park is not very well lit after leaving the paved paths, so I wasn't quite sure what the object was, but my imagination filled in the gaps to reveal what could be a forgotten tennis ball. Over the last couple of years I've tried at times to get Nozomi to play around a bit like she used to without much success. While she still enjoys having her stuffed dog Kodama around, the toy is really more for smelling than anything else. She ignores balls and ropes completely.

A Forgotten Tennis Ball

As we got closer to what I believed to be a ball, I tried to get Nozomi feeling a little excited. I used a playful voice and asked her some nonsensical questions about running shoes and whether she stretched before coming out for a walk. My goal was to encourage her to get closer to the object so that I could see if she wanted to have some fun again like we see other dogs doing in the park from time to time.

The goading paid off. Sitting forgotten in the middle of the outfield was a relatively new tennis ball. I kicked it over to Nozomi and she responded instantly, jumping into the path of the spinning object and claiming it as hers with a playful growl. I managed to wrestle it away with some misdirection then tossed the ball a couple of meters, hoping she would chase after it. Chase she did. For the first time in quite some time a youthful, playful puppy was enjoying a warm evening outside with a ball and a game of fetch. This was the first game I taught her many years ago when we lived in Kashiwa, before the big quake hit. Watching her chase after the ball in much the same way she chased after the stuffed heart-shaped toy that she would chew on in the pet shop before we brought her home was like therapy. She growled playfully when I would approach. She wagged her tail just like she used to. Her eyes smiled with delight.

Sadly, this wasn't to last. In less than five minutes she was exhausted and wouldn't chase after the ball anymore. She wanted to continue with her walk and get home for dinner. Given that this was the biggest workout she's had in months, I can't say I blame her. This will not be her last workout, though. Not by a long shot; I brought the ball home.

She'll get another chance to chase and play tomorrow … if she's up for it.