Book Review: The Invisible Life of Addie LaRue by V.E. Schwab

I loved the first half of this book. A young woman living in France during the early 1700’s makes a deal with the devil (The Darkness) before an arranged marriage she wants no part in. However, due to how she phrased her request (you might say, “the devil is in the details“), the devil gives her the ability to live forever, but no one will ever remember her — this leads to situations where people forget who she is the moment she walks through a doorway.

Anyway, the first half of the book mostly dealt with her experience in the immediate aftermath and then a varying number of years down the road. The second half of the book takes place in more recent times and I couldn’t totally get into it due to a newer character that gets introduced and their desires, motivations, and personality.

My favorite parts were flashbacks to various points in history, where she is experiencing new / different places and figuring out the limits of this curse / deal that she had made.

Finally, there is an interesting little plot twist with this new character that comes to light in the last quarter of the story that ends up affecting how the book ultimately ends. But I still really had to force myself to finish the second half.

Book Review: “Heavier Than Heaven” by Charles Cross

2020 has been crazy. Somehow, I just finished my 65th book of the yearHeavier Than Heaven, a biography of Kurt Cobain by Charles Cross.

I vaguely remember how big of a deal Kurt Cobain’s death was when I was in middle school, but I never really thought too much about him as a person, or the deeper meaning behind various Nirvana songs. All this, despite being a huge part of the sound track of my teenage life.

One of my biggest takeaways after reading this book was: how can you help those who don’t want it?

What a tortured, tormented soul who really struggled with life. I honestly felt down and depressed after reading certain parts of this book. I would put it down and mope about the house while I processed what I just read.

That said, another part of the book that I really enjoyed and appreciated was hearing how much joy and life his daughter brought to his life and how much he loved being a dad.

Also, after reading this, I think it’s incredible and seemingly improbable that Nirvana actually happened.

I often found myself flipping between this book and Spotify to listen to various Nirvana songs that were mentioned, trying to appreciate them in a new light and really hear them and looking at various performances on YouTube.

Relevant excerpts from “Election Meltdown”

I suppose this is going to become a recurring series, where I “doom-read” (similar to “doom-scrolling“) some relevant book related to whatever horrible thing that’s currently happening in the world.

In today’s post, I share some interesting excerpts I found while reading Election Meltdown by Rick Hansen. I found a particular passage so amusing and ridiculous that I had to tweet about it. Rick Hansen, the author, ended up retweeting me. Nice!

Onto the excerpts!

In light of recent events, where the current administration is doing everything in their power to cast doubt on the results of the upcoming elections, I was particular amused at the types of people they are putting in charge of their voter suppression efforts.

The following deals with purging voter rules.

“From this “suspense” list, he and his assistants tried to identify “foreign sounding” names to determine whether the list was excluding large numbers of noncitizens from registering. He admitted that this methodology required making “subjective” judgments.

The ACLU’s Dale Ho asked Richman why he had coded some Kansas residents on the suspense list with the last name “Lopez” as foreign and others not, but he did not get a good answer. Then Ho continued with a devastating line of questioning:

Q. Just hypothetically, Dr. Richman, if you came across the name Carlos Murguia, would you code that as foreign or non-foreign?
A. I’m sorry, could you, please, spell the name.
Q. Sure. Carlos, C-a-r-l-o-s, Murguia, M-u-r-g-u-i-a.
A. Probably.
Q. Probably what?
A. Probably would code it as foreign.
Q. Okay. Are you aware that Carlos Murguia is a United States District Court Judge who sits in this courthouse?
A. I am not.”

Another form of voter suppression is strict identification requirements. As it turns out, that is trying to find a problem where none exists.

“I had been searching for proof of a single case since the 1980s, anywhere in the United States, in which someone tried to steal an election through impersonation fraud—the only kind of fraud strict voter ID laws are designed to prevent. It is an exceedingly dumb way to steal an election, because one would have to hire people to go to the polls claiming to be someone else, hope that the people being impersonated had not yet voted, hope that the people being paid to commit felonies would actually cast a secret ballot the way the payer wants, and repeat this process undetected on a large enough scale to sway an election. It is no surprise that the News21 database covering a dozen years contained only ten possible individual cases of such fraud, and none involving a conspiracy to steal an election. Election law professor Justin Levitt found thirty-one possible impersonators casting votes out of over a billion votes cast in the United States between 2000 and 2014”

In 2013, when the Supreme Court struck down the Voting Rights Act, Justice Ruth Bader Ginsburg (we will miss you, RBG. Thank you for the trails you’ve blazed and the things you’ve done) wrote:

Justice Ruth Bader Ginsburg wrote a dissent for the four more liberal justices, lamenting that “throwing out preclearance when it has worked and is continuing to work to stop discriminatory changes is like throwing away your umbrella in a rainstorm because you are not getting wet.”

Of course, despite most people (of rational thought) realizing that voter fraud is not a real problem, the GOP is quite successful at implementing a variety of voter suppression laws across the United States.

“Alas, the intellectual collapse of the voter fraud myth has done little to slow down the pace of laws, passed almost exclusively in Republican states, that make it harder to register and vote. Instead, green lights from the Supreme Court have accelerated the pace and deepened the reach of these laws, even as lawsuits and the commission’s failure undermined their premises, and even as some lower courts have rejected or softened some of the more extreme attempts. According to a Brennan Center survey, twenty-five states enacted new restrictions on voting and registration from 2010 to 2018: “14 states have more restrictive voter ID laws in place (and six states have implemented strict photo ID requirements), 12 have laws making it harder for citizens to register, seven cut back on early voting opportunities, and three made it harder to restore voting rights for people with past criminal convictions.”

But not all hope is lost!

“Democrats have learned that campaigning on voter suppression works, for the simple reason that people are offended by efforts to make it harder for them or their friends, relatives, and allies to vote. Voting rights has become a political issue like health care or climate change. The shift toward Democrats in states such as North Carolina was partially a reaction to Republican legislative overreach on voting rules and procedures. The issue of voting rights has caused people to take to the streets, as North Carolina residents did in their “Moral Mondays” marches.”

Only 39 days until the 2020 election.

Book Review: “American Oligarchs” by Andrea Bernstein

(I have read a lot of books this year.)

There is a lot inside American Oligarchs that has been mentioned in other places before, but this is a nice compendium documenting the pervasive lies and corruption that exist at every level within the Trump and Kushner companies, organizations, and families (which are all one and the same, really) and a lot irony. Sweet, sweet irony.

The story of the Trump family proves that the apple doesn’t fall far from the tree. DJT’s grandfather, Frederick, left Germany at an early age and avoiding the mandatory service (!!) with the Bavarian army (this would later cause him to lose his citizenship). He settled down in the Pacific Northwest and owned a number of hotels and restaurants during the Klondike Gold Rush, some of which were allegedly involved of illicit activities of various sorts. He died in 1918 due to complications with the Spanish flu.

The story of the Kushners is interesting and tragic. Jared Kushner’s grandparents and extended family were rounded up by Nazis during World War II. Some members were murdered, and others sent to concentration camps where they eventually made a daring escape. After the war, Jared’s grandparents were displaced people without a home. Few countries wanted to take Jewish refugees, especially those lacking proper documentation.

In more recent times, both families have displayed fairly dubious business skills, while projecting an air of confidence (but come across as desperate for acceptance and recognition). Cross them the wrong way and they will hold grudges for life.

Despite this, they have somehow always managed to fail upward. Sadly, this now has some pretty drastic consequences for our democracy.

If you didn’t want to eat the rich before this book, you’ll feel like you’re ready for a five-course meal of cooked oligarch once you’ve finished. We have some serious issues to fix and we should start by locking all of these fine folks up.

I gave it 4 stars on Goodreads.

3 weeks of GOES-17 imagery: hurricanes, wildfires and more

I recently built a side project recently that automatically downloads GOES-17 imagery every 10 minutes and then compiles it into a video.

The result is pretty darn awesome! Here is 3 weeks of GOES-17 imagery sourced from NOAA / CIRA / RAMMB. The video begins the night of August 15th, 2020 as lightning storms rolled through Northern California and runs until the afternoon of September 10th, 2020.

Almost immediately, you begin to see smoke plumes from fires created due to lightning strikes.

Note: The blue and yellow blocks that you see periodically flash on screen are the result of corrupted image data downlinked from GOES-17. I’m not sure exactly what causes this, but these errors are present within the original images files hosted on NOAA’s CDN.

(Be sure to bump up the video quality — YouTube’s default compression really ruins the image)

For those who appreciate clean air…

It seems like every year, late in the summer or early in the fall, the air in the Bay Area fills with thick smoke from raging infernos happening around northern California. The air is hazardous to breath, preventing you from taking kids to the park, walking your dog or even opening your windows.

Last year, we made the wise decision to purchase an air purifier, which admittedly, looks like a giant iPod shuffle.

As fires continue to burn around these parts, we’ve started to rely on air quality data from PurpleAir, which monitors air quality data from a series of IoT sensors that people can purchase for their homes or businesses.

You can view a map featuring realtime data collected from their sensors. Here in the Bay Area, the sensors are quite ubiquitous and can give a more realistic pictures of air quality near your home.

For example, here is the current air quality around the Bay Area from PurpleAir while I write this post.

For comparison, here is the current air quality map for Bay Area Air Quality Management District (BAAQMD), which we used to reference when trying to determine local air quality.

The fidelity you get from PurpleAir is pretty amazing.

Knowing this, I decided to write a Node app that periodically queries PurpleAir for air quality data from a sensor located a few blocks from our house. It continuously runs on a Raspberry Pi setup in our entertainment center and sends me a text message to close our windows when the AQI crosses above 100.

I’ve made the source code available on Github. Check it out!

It’s kind of fun when a band gives you a call out…

In the early 2000’s, one of my favorite punk bands was Tsunami Bomb. I followed them up and down the West Coast, going to a ton of shows and meeting a lot of cool people in the process. They went on hiatus in 2005. In 2009, the had a reunion show up here in the Bay Area, so I went and took a number of photos.

(Interestingly, they reformed again in 2015 with a slightly different lineup… and I sadly haven’t gone to see them live yet).

Anyway, they recently had an Instagram post celebrating their anniversary and posted one of my photos. Nice!

It was a pretty awesome show. A few more photos…

Book Review: “The Wax Pack” by Brad Balukjian

The premise: a baseball fan fondly recalls his childhood memories of obsessively opening and collecting packs of baseball cards.

While watching an A’s game one afternoon at the Coliseum (which he rightly describes as a “post-apocalyptic crater ringed with hot dog stands”), he wonders what the players featured on the cards he collected as a kid were doing with their lives after their baseball careers had ended.

After purchasing a pack of cards on eBay from 1986, (the first year the author remembers having baseball cards), he sets off on a road trip across America to find and hopefully meet the 14 players featured in this 30-year-old card pack.

High jinks, hilarity and even important life lessons ensue.

This was just a great read and I highly recommend it for any baseball fan. Check it out on Goodreads.

A simple dark-mode hook for React

I recently wrote a simple hook for React to automatically detect a device’s dark mode preference (as well as any changes to it) and style your web app accordingly, using something like ThemeProvider from styled-components.

It was developed as part of a side project I was hacking around on using my personal React Starter Kit, which is my own React project for quickly getting prototypes and side projects up and running.

I’ve released this as a standard GitHub repo instead of an NPM module due to the simplicity of this hook, especially in light of one-line packages breaking the Internet. To use it, just copy it into your project where needed.

I’ve released this under an MIT license. Feel free to use as-is, fork, copy, tear apart, profit, and share as you wish.

You can check out the code on Github.

This might explain why I enjoy washing dishes

Fun fact: I like washing dishes.

In light of current events, I’ve found myself doing it much more than usual. However, I’ve never really been able to explain why I’ve enjoyed it so much but I’ve felt there is something relaxing and even meditative about it.

It turns out, I’m not alone in this line of thinking and it’s been mentioned by ThĂ­ch Nhất Hạnh as a way to cultivate mindfulness.

Adam Hanley randomized two groups of college kids and had half read Thich Nhat Hanh’s instructions for mindful dish-washing while the others read simple, mechanical instructions.

After the students washed the dishes, members of the group that had read mindfulness teachings reported having a better experience, a joyful experience, and had lost track of time.

Hanley’s study was published in 2014. Some notes from the abstract are below:

This study sought to investigate whether washing dishes could be used as an informal contemplative practice, promoting the state of mindfulness along with attendant emotional and attentional phenomena. We hypothesized that, relative to a control condition, participants receiving mindful dishwashing instruction would evidence greater state mindfulness, attentional awareness, and positive affect, as well as reduce negative affect and lead to overestimations of time spent dishwashing. A sample of 51 college students engaged in either a mindful or control dishwashing practice before completing measures of mindfulness, affect, and experiential recall. Mindful dishwashers evidenced greater state mindfulness, increases in elements of positive affect (i.e., inspiration), decreases in elements of negative affect (i.e., nervousness), and overestimations of dishwashing time.

Fixing rendering issues with React and IE11

Happy April Fools’ Day. This post is no laughing matter because it deals with IE11. 🙀

Awhile back, we had an issue where visitors to our site would hit our landing page and not see anything if they were using Internet Explorer 11. The skeleton layout would appear on the screen and that was it.

Debugging the issue using IE11 on a Windows box proved to be difficult. Normally, we open up the inspector window, look for an error stack and start working backwards to see what is causing the issue.

However, the moment I opened the inspector, the site would start working normally again. This lead me down a rabbit hole and I eventually found a relevant post on StackOverflow: “Why does my site behave differently when developer tools are open in IE11?”

The suggested solution was to implement a polyfill for console.log, like so:

if (!window.console || Object.keys(window.console).length === 0) {
  window.console = {
    log: function() {},
    info: function() {},
    error: function() {},
    warn: function() {}
  };
}

Interestingly, we didn’t have console.log statements anywhere in our production build, so I figured it must be from some third party library that we were importing. We added this line of code at the top of our web app’s entry point to try and catch any instances of this. For us, that was located at the following path: src/app/client/index.js

After rebuilding the app, things were still broken, so the investigation continued.

We eventually concluded that the issue had to do with how our app was built. Our web app is server side rendered and we use Babel and Webpack to transpile and bundle things up. It turns out, Babel wasn’t transpiling code that was included in third party libraries, so any library that was using console.log for one reason or another would cause our site to break.

(The fact that IE11 treats console.log statements differently when the inspector is open vs. not is an entirely separate issue and is frankly ridiculous.)

Knowing this, we were eventually able to come up with a fix. We added the polyfill I posted above directly into the HTML template we use to generate our app as one of the first things posted in the head block. The patches console.log so that it’s available in any subsequent scripts (both external or not) that use it.

<!doctype html>
  <html>
    <head lang="en">
      <meta content="user-scalable=no, width=device-width, initial-scale=1.0, maximum-scale=1.0" name="viewport"/>
      <meta charSet="UTF-8"/>
      <script>
        if (!window.console || Object.keys(window.console).length === 0) {
          window.console = {
            error: function() {},
            log: function() {},
            warn: function() {},
            info: function() {},
            debug: function() {},
          };
        }
      </script>

After that, everything started working again in IE11.

#TheMoreYouKnow

Relevant excerpts from “Spillover”

In light of the current COVID-19 pandemic, I’ve been reading “Spillover: Animal Infections and the Next Human Pandemic” by David Quammen, published in 2012 (!!).  It takes a look into various zoonotic viruses that make the jump from animal to human. There have been a number of passages that have just jumped out and resonated with me as I’ve been reading.

One further factor, possibly the most crucial, was inherent to the way SARS-CoV affects the human body: Symptoms tend to appear in a person before, rather than after, that person becomes highly infectious. The headache, the fever, and the chills—maybe even the cough—precede the major discharge of virus toward other people. […] That order of events allowed many SARS cases to be recognized, hospitalized, and placed in isolation before they hit their peak of infectivity.

And a few paragraphs later:

“That probably helped account for the scale of worldwide misery and death during the 1918–1919 influenza: high infectivity among cases before they experienced the most obvious and debilitating stages of illness. The bug traveled ahead of the sense of alarm. And that infamous global pandemic, remember, occurred in the era before globalization. Everything nowadays moves around the planet faster, including viruses. If SARS had conformed to the perverse pattern of presymptomatic infectivity, its 2003 emergence wouldn’t be a case history in good luck and effective outbreak response. It would be a much darker story. The much darker story remains to be told, probably not about this virus but about another.”

One section of the book that was especially chilling involved the monkeys that inhabited the sacred monkey temples on Bali. In 2014, Kerry and I took our honeymoon there and I had even posted about the crazy monkeys: “While cute looking, the monkeys here are ridiculously aggressive. It was a bit scary!

Anyway, the monkeys on the island are all apparently infected with herpes B, which kills nearly everyone.

The monkeys aren’t shy about accepting, even demanding, those handouts. They have lost their wild instincts about personal space. Enterprising local photographers run a brisk trade in photos of tourists posed with macaques. “And here’s me in Bali, with a monkey on my head. Cute little guy, just wanted that Snickers bar. But the cute little guys sometimes bite and scratch.”

Engel, Jones-Engel, and their colleagues gathered two interesting sets of data from this place. They surveyed the monkey population, by way of blood samples; and they surveyed the human workforce at Sangeh, by way of interviews and also blood samples. What they found says a lot about the scope of opportunity for virus spillover between Asian monkeys and people.

The team drew blood from thirty-eight macaques, of which twenty-eight were adults, the rest youngsters. They screened the blood serum for evidence of antibodies to herpes B, the same virus that killed William Brebner and most of the other people ever infected with it. The results of the lab work were chilling: Among adult long-tailed macaques at Sangeh, the prevalence of herpes B antibodies was 100 percent. Every mature animal had been infected.

But, there is good news!

The researchers merely estimated that there must be thousands of monkey-bitten tourists walking away from Sangeh each year—and Sangeh is just one such Balinese monkey temple among a handful. The odds of a human contracting herpes B under these circumstances seem vast.

But it hasn’t happened, so far as anyone knows.

I recommended the book to my dad and he asked if it had a happy ending. I shared this passage toward to end of the book with him.

“These scientists are on alert. They are our sentries. They watch the boundaries across which pathogens spill. And they are productively interconnected with one another. When the next novel virus makes its way from a chimpanzee, a bat, a mouse, a duck, or a macaque into a human, and maybe from that human into another human, and thereupon begins causing a small cluster of lethal illnesses, they will see it—we hope they will, anyway—and raise the alarm.

Whatever happens after that will depend on science, politics, social mores, public opinion, public will, and other forms of human behavior. It will depend on how we citizens respond.”

He replied simply, “so much for the happy ending.”

I ended up rating this book 5 stars on Goodreads. I probably wouldn’t have discovered it if not for the current global pandemic, but it is something I think I’d have enjoyed before everything changed. David Quammen looks at a number of zoonotic diseases (SARS, Lyme, and AIDS among them) and their fascinating histories.

See a satellite tonight (maybe)

I’ll admit, it’s been awhile since I’ve seen the International Space Station pass overhead (it’s something I loved to do in the past).

While reading about Elon Musk’s ambitious plan to build a constellation of over 40,000 satellites for providing Internet coverage, I discovered a pretty awesome website for tracking viewing opportunities for his Starlink constellation, as well as other notable objects in orbit (such as the ISS):

See a Satellite Tonight is a project put together by James Darpinian, that shows you which satellites will be visible in your location per the next few days. As an added bonus, you can view where in the sky the satellites will pass overhead using Google Streetview. It’s pretty neat!

On the off chance that the SpaceX Starlink constellation is passing overhead, check it out — you’ll see a train of (as of this writing) 60 satellites appear overhead.

Due to weather and lighting condition in Oakland, I haven’t been able to see it yet, but my dad sent me the following message after using the same website:

Made a point to get up early this AM to watch for Elon’s Starlink. Wow, what a sight! 60 satellites in a row. Just thinking about all the implications of this. Definitely a visual I’ve never seen in my lifetime! Kind of surreal, actually.

Next level code review skills

I’m always searching for better ways to improve my workflow, increase productivity, and just generally learn new and exciting things. (Besides, it’s part of having a healthy growth mindset.)

We’ve had some big changes on our team during the past year and I’ve felt like I’ve needed to step up when it comes to reviewing code that my fellow colleagues write. While searching for some ideas on how to improve my code review skills, I discovered a blog post from 2018, entitled “Code Review from the Command Line“.

This blew my mind and really helped reframe how we engineers should approach code reviews:

When I ask that other people review my code, it’s an opportunity for me to teach them about the change I’ve just made. When I review someone else’s code, it’s to learn something from them.

Jake, the author of the above post, goes on to describe his setup and custom tooling for conducting an interactive code review.

He uses custom git alias to see which files have changed and how many changes there are, a custom script that visualizes how often the files within the pull request have changed over time, and another custom script that can visualize the relationship between changed files.

All of these go above and beyond the call of duty for reviewing code, but it’s stuff that decreases friction and can make a sometimes tedious process much more enjoyable.

I’ll be implementing some of these ideas into my own workflow in the near future.

Book Review: “Talking to Strangers” by Malcom Gladwell

Talking to Strangers” examines how our internal and cultural biases affect our interactions and perceptions of the people around us.

Early in the book, Gladwell mentions a study that gets right to the heart of the book and was really eye opening for me.

It’s a study into the “illusion of asymmetric insight” and shows us how we think we’re good an interpreting what a stranger is thinking or their intentions (spoiler: we’re actually really horrible at it).

Participants were required to complete a set of words with missing letters and then asked what the results say about them.

For example, someone was given “TOU _ _”. Some people would fill in the blanks as “TOUGH” and others would put “TOUCH”.

Afterward, the participant was asked if they think these results reflect their beliefs and core values. Nearly every participant said their word choices were random and had no relation on how they view the world.

Then they were given a random set of words from other people and asked the same question: What do you think these word choices say about these strangers?

Everyone had a strong opinion within literally minutes of being asked the same question about themselves! “Whoever wrote these sounds pretty vain“, or “this person sounds very obsessed with money and power.

Crazy, right?

The book is full of studies like this, as well as specific examples from real life interactions like this (some with very tragic consequences) and takes a deeper look into why things might have played out the way they did — from a traffic stop in Texas that went very wrong, broken diplomatic promises before World War II, a high-profile sexual assault that occurred at Stanford, and even looking into the motivations of people who try to commit suicide and our collective misunderstanding as to why and where these things happen.

I went into this book not knowing exactly what it was about. I thought, “Oh! New Malcom Gladwell book and it seems to be getting some good reviews, let’s go for it”. It took around a chapter or two for me to really get into the book and see where it was going, but when things finally clicked for me, this was fascinating and enlightening look at every day interactions.