Misframe

Aug 20, 2020

Apple Watch Uses

Two years ago I didn’t want to get an Apple Watch. I wanted a Fitbit Alta HR because I had an older Alta without heart rate monitoring, and that was the only feature I really wanted.

The Fitbit tracked my steps and sleep, alerted me to calls, texts, and calendar events. I thought if I add heart rate monitoring then I’d be getting pretty much the same capabilities as an Apple Watch. So I ordered a Fitbit Alta HR on Amazon.

Immediately after ordering the Fitbit I started reading more about the Apple Watch and, well, started rethinking my decision. Anyway, the Fitbit got lost during shipping and I took it as a sign and ordered an Apple Watch instead 😅.

Keep reading→

Aug 13, 2020

What are my popular posts like?

I’ve been blogging for almost a decade now 😯. I like looking at my Google Analytics data every once in a while to see what content gets the most views. Some posts are more popular than others (regardless of when they were published), so I highlight them as top posts.

I didn’t know those posts would be popular when I wrote them. I wouldn’t even say they’re all my best work. But they’re popular and I wanted to understand why – or at least understand some of the similarities.

As of August 13 2020, the most popular posts on this blog in the past 28 days are:

  1. Recovering MySQL replication after error 1236
  2. List of Time Series Databases
  3. Optimizing Concurrent Map Access in Go
  4. Using Ansible with GitHub Actions
  5. Faster MySQL replication with group commit and delay

Occasionally Using libuv with C++ makes the top 5, but apparently not this time.

All of those posts are solutions to problems I had. They are the results of hours (or days!) of research and/or problem solving. For example, the TSDB list started off as a research task at work. We were looking for something that could replace MySQL for time series, and after hours of research I ended up with a list of various TSDBs and short notes about each of them. I just published that list. The rest of the posts are short posts with bits of code showing how to do something. They’re all straightforward, not very complicated, and didn’t take a long time to write. The actual writing part didn’t take a long time, but getting the actual content did.

It took me a long time to get to these solutions because I couldn’t find the answer anywhere else, so I had to figure things out on my own. Once I got something working I published a post, mainly as a reference for myself. Clearly they’re useful for others too. For example, I think I wrote the first post about using Ansible with GitHub Actions, and now it’s one of the top Google results when you search for something like “github actions ansible”. Never expected that!

I think these posts are popular because I’m not the only one who encountered these problems, but I may be one of the first to write about the solutions. If something takes me a few hours to figure out, then hopefully writing a post will bring that down to minutes for someone else, including myself in the future.

What I got from this brief analysis is this:

  • If something takes you more than a couple of hours to figure out, it’ll make a good post.
  • The bar for good, interesting content is lower than you think. This is a good thing! No need to gatekeep content that you don’t think is good enough. Keep writing.

With that in mind, I don’t think I’ll ever run out of blog post content. 🙂


Jun 15, 2020

Dark theme

I added a dark theme to this blog over the weekend. Here’s how you can do something similar with just a few CSS updates.

The first thing I did was move all color codes to variables. This is useful in general so you can define colors once and reuse them instead of copying and pasting color codes everywhere.

:root {
  --main-bg-color: white;
  --main-fg-color: black;
  --date-fg-color: #c0c0c0;
  --border-color: #eee;
}

Those are the only 4 colors I use. Next, I updated styles to reference those variables, like this:

.mf-header-nav-links a {
  color: var(--main-fg-color);
}

I also had to add rules for things that assumed certain defaults, like the body text color and background:

body {
  color: var(--main-fg-color);
  background-color: var(--main-bg-color);
}

Finally, I added a media selector for dark color scheme preferences. All it does is update the variables I defined earlier.

@media (prefers-color-scheme: dark) {
  :root {
    --main-bg-color: black;
    --main-fg-color: white;
    --date-fg-color: #888;
    --border-color: #333;
  }
}

And that’s it! It only took a few minutes to do. All of the websites I have created recently use CSS variables and the prefers-color-scheme media selector because they’re so useful.


Apr 28, 2020

ReadFaster.app

I have a new project! It’s called ReadFaster.app. I’m launching it May 1, 2020.

When I usually talk about my projects, I’m either thinking about starting something or already have something in progress. This time is different: I’m already done!

ReadFaster.app

I started this project for Startup School. I needed something to build and decided to work on something I’ve wanted for a while.1 Plus this idea is simple enough to implement that it gave me time to focus on other aspects.

This project was more about the process and execution, and less about the idea itself. It was my first time taking the Startup School course, attending group sessions, getting feedback about the idea, and talking to users… all before writing a single line of code. Usually I start with code 🙃. I learned a lot this way, like how to really focus on the problem and the why.

I did most of the implementation in the last couple of weeks. It was a nice way of taking advantage of all of the free time I have during this COVID-19 pandemic.

Here are some implementation details. I did a few new things this time:

  • Go API
  • Preact UI (first time using Preact instead of Mithril.js)
  • PostgreSQL (not my own K-V store this time, phew!)
  • Docker containers on a DigitalOcean droplet
  • CloudFront (CDN for everything, including APIs!)
  • Built using GitHub Actions
  • Deployed using Ansible in a GitHub Action

Now that this is all done… I should to get back to reading 😂.


  1. I was using my old Transverse project for this use case but it was a poor experience.

Apr 27, 2020

Thoughts on QA

A former colleague used to tell me that when it comes to QA, there’s no replacement for someone manually clicking around and trying different things in your product. After thinking about that for a few years, I agree with it more than ever.

Automated unit tests, integration tests, end-to-end (E2E) tests are all important. They make sure things work as expected. They catch any breaking changes you may accidentally introduce. You gotta have them. But they’re only as good as your test cases. You can cover a lot of ground with just a few test cases, but getting to 100% coverage often requires unreasonable amounts of time. Not worth it. That’s OK—done is better than perfect.

You know what QA approach I think has a great return on investment? Just clicking around and trying different inputs. You don’t need to think so much about what to test. Just play around with things. It’s often very clear when things don’t work as expected. I find lots of issues this way.

You can start by opening up your documentation and following what it says. This is how users start using your new features anyway, right? It’s important to make sure those cases work flawlessly.

Demo prep is also a great way to find issues outside of automated tests. Those are usually the first times I try out a feature with an actual use case or workflow instead of something in isolation. Plus, the issues I find aren’t just bugs that slipped past automated tests but also usability issues, things that make workflow implementation really hard or impossible.

The final test for quality comes from having a person trying out what you built. Better for you to run that test before a customer.


Mar 9, 2020

Reading in sips

I’ve been trying to read more. I’ve had a Goodreads reading challenge every year since 2017, and my goals have been at least 12 books a year. Even though I’m more serious about reading than ever, I’m actually reading less. It’s been difficult to come up with a reading strategy that becomes a habit.

Keep reading→