# Recently - October 5


September came and went. We're entering the rainy season in Seattle, but so far
there've been a few nice weekends to break up the gray. We had a few weeks of
really bad air quality last month because of the wildfires, but that seems to
have subsided. It's uh... really saying something about the current year that
one of the bright spots is clean air. But, hey, I won't be taking air quality
for granted anymore.

## Recently: Reading

-   [Abaddon's Gate](https://www.goodreads.com/book/show/16131032-abaddon-s-gate):
    _Abaddon's Gate_ is the third novel in James S. A. Corey's[^1] _The Expanse_
    series. It's a solid continuation of the first two books. I'd hoped that the
    series would reach a natural stopping point after 3 books, and while the
    book doesn't end on a cliffhanger, it strongly leads into the next book in
    the series. I've been enjoying _The Expanse_ sofar, but I'm not a huge fan
    of long series (currently, the series is scheduled to have 9 novels, with
    additional short novellas).
-   [Watchmen](https://www.goodreads.com/book/show/472331.Watchmen): I recently
    got my hands on a copy of the first 12 Watchmen issues. I've heard that the
    recent Watchmen HBO series is excellent, but that you needed to have read
    the graphic novel(s) first before watching the series. I don't read many
    graphic novels / comics, so it's been an interesting read. I kinda feel
    guilty reading through it, because there's clearly been so much artistry put
    into the illustrations, and yet the pacing of the writing has you reading
    through it rather quickly. It's definitely a rich medium. As far as the
    text, I feel like I'm missing some context; the plot is set in the Nixon
    era, and seems to assume a familiarity with comic book tropes -- both of
    which leave me at a disadvantage in understanding. It's been an enjoyable
    read nevertheless.

## Recently: Games

I've gotten back into a habit of playing video games on weekends. In the past ~5
years, I've (somewhat irrationally) resented the idea of "lazy Saturday
mornings", but with so many fewer activities available in COVID times, games
have become a welcome source of novelty.

-   [A Short Hike](http://ashorthike.com/): I picked up this game as part of the
    Itch.IO Social Justice Pack over the summer. It was highly recommended by
    some coworkers, so I gave it a shot. It's a wonderful indie game that I
    played through in a single sitting (maybe 2-3 hours). Great art style,
    charming story, and a really
    [pleasant soundtrack](https://www.youtube.com/watch?v=R8p2YMww4WU). It nails
    the feeling of exploration too.
-   [Factorio](https://factorio.com/): I finally "finished" my Factorio 1.0
    playthrough. It was thoroughly enjoyable. Since I last played a full game,
    there have been a lot of improvements to the "late game" that kept me
    playing long after I would have previously lost interest. Factorio
    definitely earned it's 1.0 version number -- it feels like a strong,
    complete game now.
-   [Satisfactory](https://www.satisfactorygame.com/): I've also started playing
    Satisfactory, but I'm only just past the tutorial, so I don't have much to
    say about it yet. In contrast to Factorio, my first impression of
    Satisfactory is that it still has some of the noticeable imperfections of an
    Early Access game.

## iOS 14

It's been a few weeks since I've been running iOS on my various iDevices, and
I'm impressed with the changes. 👍 I've already written a little about iOS 14 --
though my [previous post](/blog/2020/09/22/Five-iOS-14-Shortcuts-Tips/) was
focussed on the Shortcuts improvements in iOS.

The biggest improvement that I've noticed is the addition of Widgets and the
"App Library" (which allows you to hide icons from the home screen). Android has
had something similar for a long time, but I'm glad that Apple has followed
suit. I've made the first big change to my home screen layout in years: I've
incorporated the Shortcuts folders I wrote about in my previous post, as well as
a "featured image" Widget, which shows me nice photos I've taken over the years.
Especially in COVID times, that little infusion of nostalgia + novelty is
delightful.

![](https://benjamincongdon.me/blog/2020/10/05/Recently-October-5/homescreen.jpg)

I also like that the default Apple keyboard now supports Emoji search (finally!
🙄🥳). I still prefer the emoji search in Google's Gboard better, since the
search results UI shows more emojis, but... it's a step forward.

Finally, switching AirPods connections between multiple iOS devices has improved
significantly. I can be listening to a podcast on my phone, and if I quickly
pull out my iPad and start a YouTube video, the audio output seamlessly
transitions to my iPad. It works ~98% of the time, which is not perfect, but
good enough to be a noticeable improvement over previous iOS versions.

## Dark Mode

I'm a big fan of dark-mode UIs, and since dark mode came to the Mac in Catalina,
I've been wanting to add a dark mode for this blog. CSS isn't my strong suit, so
I put it off for a while because the task of making a big change to my blog's
style was daunting.

![Dark Mode Theme](https://benjamincongdon.me/blog/2020/10/05/Recently-October-5/darkmode.png)

However, in recent redesigns I made an effort to lean in to using SCSS variables
for colors. This made making a dark mode a lot easier; most of the guides I read
online
([this one](https://css-tricks.com/a-complete-guide-to-dark-mode-on-the-web/) by
CSS Tricks was pretty good) suggest using CSS variables to toggle the dark mode.
In the end, I used an approach like below:

```scss
// variables.scss
@mixin light-mode {
    --body-color: black;
    //...
}

@mixin dark-mode {
    --body-color: white;
    //...
}

:root {
    @include light-mode();
    @media (prefers-color-scheme: dark) {
        @include dark-mode();
    }
    .dark-mode {
        @include dark-mode();
    }
}

// main.scss
body {
    color: var(--body-color);
}
```

In other words, I have a `variables.scss` file that defines a bunch of CSS
variables for colors (background colors, font colors, hover colors, etc.), and
then throughout my SCSS I can make reference to those variables. Then, there's a
media query in the variables class that swaps out the values for the CSS
variables when dark mode is enabled. I also have a `.dark-mode` class I can
enable on the top-level `<body>` HTML tag, so that I can add a dark mode toggle
button in the future.

It was a smaller project than anticipated, and it looks better than I'd hoped.
CSS remains something that I'm not incredibly comfortable with -- but I think
it's more the _design_ aspects that I have less experience with. I feel
reasonable confident in my ability to mechanically change styling... Design
thinking is a whole other skillset.

## Assorted Links / Updates

-   As of mid-September, I've now been working from home (vis-à-vis the
    pandemic) longer than I worked in an office. 😬
-   ["AVIF has landed"](https://jakearchibald.com/2020/avif-has-landed/) - Well
    worth the read. I'd never heard of the AVIF image format before, but it
    seems to do a great job of compressing images without losing much
    perceptible detail.
-   [miniflux-to-sqlite](https://github.com/bcongdon/miniflux-to-sqlite/) - I
    wrote a small script to export [Miniflux](https://miniflux.app/) (my RSS
    reader of choice) data to sqlite, to be consumed/visualized by
    [Datasette](https://docs.datasette.io/en/stable/). Miniflux uses PostgreSQL
    under the hood, so the script is a pretty simple translation layer.
-   [National Inventory of Dams Data](https://github.com/bcongdon/nid-data) - In
    other Datasette-related news, I published a dataset I found on
    [data.gov](https://www.data.gov/) to test out Datasette's publishing
    capabilities. The deployed version is live at
    [https://nid-datasette.vercel.app/](https://www.data.gov/). I wrote a few
    thoughts about it in
    [this thread](https://twitter.com/BenRCongdon/status/1305893146031661056),
    but the TL;DR is deploying (small) datasets with Datasette is remarkably
    streamlined.

[^1]:
    I learned recently that James S. A. Corey is not an actual person; rather,
    it's the pen name of
    [two authors](https://en.wikipedia.org/wiki/James_S._A._Corey).

