The World of Yesterday by Stefan Zweig

This is an absolutely beautiful (yet heartbreaking) memoir written in the midst of World War II.

Completed in 1942 (and sent to his publisher just days before he and his wife took their lives), it provides an intimate and fascinating look at life in Europe during the end of the Victorian Era and through two world wars.

I think one of the most striking things about this book (especially in the later pages) is how mournful, almost hopeless, Zweig is about the state of Europe and the world as a whole. And it’s no surprise, right? He was an Austrain Jew who saw the home and the people he loved destroyed.

Take this passage, written about Paris. He lovingly describes his time in Paris after he graduated from university and how it was a city that could always make people happy.

“I had promised myself a present for the first year of my newly gained freedom—I would go to Paris. Two earlier visits had given me only a superficial knowledge of that city of inexhaustible delights, but I could tell that any young man who had spent a year there would be left with incomparably happy memories for the rest of his life. Nowhere but in Paris did you feel so strongly, with all your senses aroused, that your own youth was as one with the atmosphere around you. The city offers itself to everyone, although no one can fathom it entirely.”

And then a paragraph later, we get to the hard truth about the time period this book was written in:

“Of course I know that the wonderfully lively and invigorating Paris of my youth no longer exists; perhaps the city will never entirely recover that wonderful natural ease, now that it has felt the iron brand forcibly imprinted on it by the hardest hand on earth. Just as I began writing these lines, German armies and German tanks were rolling in, like a swarm of grey termites, to destroy utterly the divinely colourful, blessedly light-hearted lustre and unfading flowering of its harmonious structure. ”

Another powerful aspect of this book is that while reading, we know that he would soon take his life and he’d never get to see how this tragic story (World War II) ended and how the cities, art and music he loved would eventually recover.

The World of Yesterday by Stefan Zweig

Sid Meier’s Memoir!: A Life in Computer Games

The Civilization series is easily one of my favorite video games of all time. (See here, here, here, here and here). I have very fond memories of talking to my middle school teacher about various strategies to utilize within Civ I and I still vividly remember the wickedly cool box art.

So, it’s no surprise that I’d dig into the memoir of the man who created the games himself, Sid Meier.

It’s a nerdy trip through early computer gaming history and fostered a bunch of nostalgia for old DOS games that I used to play. It’s also a fantastic romp through the mind of a game designer.

There were a number of fun little quotes and life lessons, as well:

“I think that in life, as in game design, you have to find the fun. There is joy out there waiting to be discovered, but it might not be where you expected. You can’t decide what something’s going to be before you embark on it, and you shouldn’t stick with a bad idea just because you’re fond of it. Take action as quickly and repeatedly as possible, take advantage of what you already know, and take liberties with tradition. But most importantly, take the time to appreciate the possibilities, and make sure all of your decisions are interesting ones.”

Generating terrain maps

Recently, I went down a rabbit hole attempting to learn how to generate interesting looking maps for games (insert mind-blown-gif here). While I’m not going to be using Voronoi diagrams anytime soon,  I am still interested in attempting to generate Civilization-like maps.

Most map generation algorithms rely on perlin noise. I wanted to go a different route.

So far, these are the rules that I’ve come up with for my algorithm:

1. Create a grid of some given size (e.g., 100 x 50). Set all tiles to “ocean”.
2. Randomly pick 8 tiles (variable) across the map to seed as “land”.
3. Now iterate across all tiles on the map and build an array of tiles that are “ocean” tiles but have a land tile N/W/S/E of them.
4. Once you have this array, randomly pick a single value. Flip it from “ocean” to “land”
5. Repeat step 3 until a given number of tiles have been filled across the grid (e.g., for an “Earth-like planet”, 30% of tiles will be land).
6. Now, to add some additional randomness — iterate across all tiles and build an array containing all “land” tiles next to water (N/W/S/E).
7. Randomly pick 1, flip from land to ocean.
8. Repeat step 6 a given number of tries (e.g., 100).
9. Done! (Maybe)

Height maps, biomes and all that can come later. To quote Amit, whom I linked to earlier:

The most realistic approach would have been to define elevation first, and then define the coastline to be where the elevation reaches sea level. Instead, I’m starting with the goal, which is a good coastline, and working backwards from there.

Anyway, it’s been kind of neat to figure out.

Another example map, created using the above rules:

 

Troubleshooting a (Royal) Kludge (RK G68): Sleep issues with my swanky new mechanical keyboard

TL;DR After a lot of testing and isolating devices, I’ve determined that the RK G68 RF receiver for my swanky new mechanical keyboard causes my Windows 10 machine to wake up immediately after putting it to sleep. And I’m not sure how to fix it.

Join me on an epic journey of heartbreak, anger, loss, triumph and sadness as I try to diagnose some sleep issues.

—-

So, the issue is that if I manually put my computer to sleep (Start Menu -> Power -> Sleep), the machine goes to sleep, fans turn off, and all that. Sweet! Then, after about 5 seconds, it wakes right back up. Uh, what?

I’ve done a number of debugging and testing steps which I’ll outline below (hopefully, this helps some folks in the future).

Let’s do a couple of finger stretches, put on our hacker pants, and open up PowerShell (with admin access). We can run a nifty command called powercfg /requests

I see the following output:

DISPLAY:
None.

SYSTEM:
None.

AWAYMODE:
None.

EXECUTION:
None.

PERFBOOST:
[DRIVER] Legacy Kernel Caller
Power Manager

ACTIVELOCKSCREEN:
None.

Great! But not really super helpful. We visit our friend, Google, and I see that there is a command to disable this:

powercfg -requestsoverride Driver "Legacy Kernel Caller" System

You haven’t lived until you’ve copy and pasted random commands from the Internet into your terminal. Let’s do it! I run that and make the computer go to sleep again. Monitor turns off, fans spool down. Yes! Yes?

Obviously, it immediately wakes up. No dice.

Ah, ha! Maybe read the command first, dude? The issue here is that the Legacy Kernel Caller is in the PERFBOOST category, not SYSTEM category. That’s easy to fix.

…but it isn’t.

Of course, you can’t actually disable the driver for items in the PERFBOOST category. Of course.

Hey, Google…

Next up: A suggestion to check waketimers. I have no idea what that is, but sure: powercfg -waketimers

There are no active wake timers in the system.

Okay.

Yo, Goooooooogle… again!

Ah, another command! powercfg -lastwake

Now we’re getting somewhere. We see that this is a USB device that is waking the computer:

Wake History Count - 1
Wake History [0]
  Wake Source Count - 1
  Wake Source [0]
    Type: Device
    Instance Path: USB\VID_25A7&PID_FA70\8&e5ec113&0&4
    Friendly Name:
    Description: USB Composite Device
    Manufacturer: (Standard USB Host Controller)

But… how do we determine what it is? Looking at the path, we see VID and PID. That means:

Vendor ID: 25A7
Product ID: FA70

Let’s Google those: It turns out, the vendor is Areson Technology Corp and it looks like they make RF receivers for various input devices, such as wireless mice. Interesting! No hits for the product ID. That’s fine, there’s probably more types of RF receivers on planet Earth than there are people.

But that gives me a starting point.

I decide to start unplugging various devices and put my computer to sleep.

  • Unplug Logitech USB receiver: Still wakes up.
  • Unplug Anker USB Bluetooth receiver / transmitter: Still wakes up. I feel like I’m not having much fun anymore.
  • Unplug this random, unlabeled RF receiver: Hey, my keyboard input stopped working from my mechanical keyboard! Ah well. Go to sleep computer…

IT DOESN’T WAKE BACK UP!!!!

Victory. Party dance. Switch out the hacker pants for party pants. Now we’re getting somewhere!

I plug the receiver back in and open device manager. I go to the keyboard section (randomly, there are like 4 different devices listed there). I open the properties dialog box for each of them, go to the Power Management tab and uncheck “Allow this device to wake the computer.

I got you now, pesky sleep problems! :blow-smoke-off-gun-gif-dot-com-dot-net:

I put the computer to sleep.

IT IMMEDIATELY WAKES BACK UP!

I’ll be honest. There was a lot of screaming, kicking, swearing. My dog got up and left the room (he never does that). I almost knocked over a coffee cup onto my keyboard and I DIDN’T CARE.

Okay, fine.

No big deal, really. I’m not okay, you’re okay.

On a hunch, I expand the Universal Serial Bus controllers section inside the device manager. Sure enough, there are a bunch of things that say USB Composite Device. You might remember from earlier (but probably not), that a “USB Composite Device” was called out using the --lastwake command.

If you open up the properties for each USB Composite Device and go to the events tab, you will see the device ID in the information section. Keep looking until you find the device ID that was called out: USB\VID_25A7&PID_FA70\8&e5ec113&0&4

Click. Close. Click. Close. Click. FOUND IT!

Device USB\VID_25A7&PID_FA70\8&e5ec113&0&4 was configured.

Driver Name: usb.inf
Class Guid: {36fc9e60-c465-11cf-8056-444553540000}
Driver Date: 06/21/2006
Driver Version: 10.0.19041.488
Driver Provider: Microsoft
Driver Section: Composite.Dev.NT
Driver Rank: 0xFF2003
Matching Device Id: USB\COMPOSITE
Outranked Drivers: 
Device Updated: false
Parent Device: USB\VID_0BDA&PID_5411\7&b8f002b&0&2.

Sweet, now to just open up the Power M…. THERE IS NO POWER MANAGEMENT TAB.

My dog came back. He immediately left again. You can probably guess why.

Back to Google again:

“Ensure drivers are updated”.

Okay. Sure. Blah, blah. But maybe it’ll work. It won’t though. I already know. Who am I kidding?

The best drivers for your device are already installed.

Fine. I’ll just uninstall the driver.

Oh, cool, now my keyboard doesn’t work.

BUT YOU KNOW WHAT?! MY COMPUTER STAYS ASLEEP!

Head, meet Desk. Desk, meet Head.

—-

A few other things to note.

    • If I have a USB-C cable plugged into the keyboard, it will stay asleep (even though the RF receiver is still plugged in).
    • If I turn off the keyboard itself, it will stay asleep.
    • If you just walk away from the computer, it will go to sleep (according to my power plan settings — 15 minutes). I suspect this is because the RK software (I’m on version 2, by the way, which I think just came out and the latest firmware) is setup to put the keyboard to sleep after about 5 minutes or so. I really haven’t tried to experiment with this because I DON’T CARE ANYMORE.

(I do care. Deeply. I just can’t right now.)

Book Review: Empire of Pain by Patrick Radden Keefe

What a fantastic book about a horrible family.

The first half of the book is a true rags-to-riches story, following the life and rise of Arthur Sackler and his brothers. The son of an immigrant, he came of age during the Great Depression. This man could hustle and there was nothing that could stop him.

The second half is about the pharmaceutical company they purchased and ran. In the 90’s, they created a ridiculously powerful pain killer (OxyContin). In an effort to maximize profit, they pushed the drug onto unsuspecting patients and physicians despite knowing (and hiding) how addictive and dangerous it was.

The damage is jaw dropping. And like most crimes involving the ultra rich, the family members who ran the company (and used it as their personal piggy bank) got away with it.

Book Review: The Code Breaker by Walter Isaacson

At first glance, this book seems to be a biography of Jennifer Doudna, a biochemist and one of the pioneers of CRISPR research.

While there is some focus on her upbringing and the things that may have driven her to become a fantastic scientist, the book is really about the wide range of characters who helped discover CRISPR DNA sequences and their potential applications in modern medicine.

I’ve heard CRISPR and CRISPR-based technology mentioned in various things I’ve read and how it is something that could potentially revolutionize medicine. But that’s really all I know about it.

This book digs into how Jennifer and her team of researchers discovered the CRISPR process — essentially duplicating the way that bacteria has fought off viruses for eons — and how it could ultimately be used for various therapies, treatments and even diagnoses.

The book briefly mentions its use in the Moderna and Pfizer vaccines for COVID-19 as well as some of the more controversial and ethically questionable uses — editing the genes of a fetus, for example, to choose certain traits (which will then be passed down to its own children).

This was an enjoyable and informative read and it covered all sorts of things from the science of CRISPR, legal issues related to patents, and the use cases for CRISPR based technologies today.

Book Review: The Plot by Jean Hanff Korelitz

Quick summary: Washed up author (Jake) teaching a writing workshop finds out a former student of his (Evan) — who had an amazing idea for a story that was guaranteed to be a best seller — suddenly died without publishing or apparently sharing his story with anyone.

Jake helps himself to the idea and ends up publishing a best selling book. Only… some Internet troll knows the truth and is sending him some anonymous, threatening letters. And so begins a wild goose chase.

I definitely enjoyed this. It starts off a bit slow, but as the story goes on the pace picks up and I couldn’t put it down

I’ll be honest: I *knew* there was going to be a plot twist around a certain character the moment we met them. I just knew it. But the deviousness of it still surprised me and I really wasn’t prepared for how things went down.

That said, some of the threats the anonymous person was making toward Jake felt a bit hollow. Knowing what we knew this person probably did, they couldn’t really threaten Jake without exposing their own crimes. So, that whole thing was kind of strange…

But we find out that it actually doesn’t matter, because there is a longer game at play and Jake is merely a pawn.

It’s crazy.

Book Review: Genghis Khan and the Making of the Modern World by Jack Weatherford

A few years ago, I read Conn Iggulden’s Conquerer series, a fictional account about the rise of Genghis Khan (nĂ©e Temujin) and his exploits across Eurasia. It was a fascinating book and made me curious to learn more.

I picked this one up recently. While I enjoyed it, I often found myself thinking about how hard it must be to write a book about someone who lived amongst a nomadic tribe about 800 years ago.

The source material for this book is based upon notes found within a tome of (sometimes mythical) knowledge that was written shortly after Genghis Khan died — simply called The Secret History of the Mongols. It was written by an anonymous author and then passed down through the ages where the only remaining copy is a translation created some 200 years after his death.

The book is rarely critical of Genghis Khan, his followers (this is more of an “ends justify the means), and the sometimes ruthless actions they took to subdue a population.

That said, some of the most fascinating aspects of this story were how progressive the Mongols were when it came to improving the lives of the people they ruled: public schooling, accounting, trade, and communication. The book contains a fascinating comparison that puts his accomplishments in perspective:

“In American terms, the accomplishment of Genghis Khan might be understood if the United States, instead of being created by a group of educated merchants or wealthy planters, had been founded by one of its illiterate slaves, who, by the sheer force of personality, charisma, and determination, liberated America from foreign rule, united the people, created an alphabet, wrote the constitution, established universal religious freedom, invented a new system of warfare, marched an army from Canada to Brazil, and opened roads of commerce in a free-trade zone that stretched across the continents.”

Overall, this was an interesting (if skewed) story about an infamous character in history that many of us might have just misunderstood.

Book Review: The Burning by Tim Madigan

★★★★☆

This book is about the horrific, yet little known 1921 Tulsa race riot. The 100th anniversary of this tragedy and reflections on it reminded me about a book that I’ve had on my to-read list.

I first heard about this incident while reading Sam Anderson’s Boom Town, about the founding and growth of Oklahoma City. It briefly mentioned the Tulsa riot and how a white mob had destroyed an entire African American neighborhood.

Eager to learn more, I searched for a book about these riots… but then never followed up reading about them.

Set against a tapestry of racism, violence and resentment, this was a tinderbox waiting to explode (and these sorts of race riots had broken out in other parts of the country around this time as well).

I couldn’t believe the violence that was carried out, simply to put “black people in their place.” Looking at photos of the aftermath, the level of destruction is akin to photos of San Francisco after the 1906 earthquake and fire. Nothing is left standing. Thousands of houses destroyed, hundreds (!) of people dead.

Part of Greenwood District burned in Race Riots, Tulsa, Oklahoma, USA ,American National Red Cross Photograph Collection, June 1921.

And yet, the story was swept under the rug. It literally took decades before people started talking about it and publicly acknowledging that it happened.

My biggest takeaway was how easy it was for us human to become straight up barbaric animals when blinded by hatred.

Toward the later half of the book, the story recounts a young journalist who visited an internment center where people fleeing the violence (or were captured) were sent.

She found an older black woman crying, because she lost everything and had no idea where her family was. Eventually, the reporter asked, “how could this happen?”

“How could this not happen?” replied the old black woman.

The Burning: Massacre, Destruction, and the Tulsa Race Riot of 1921 by Tim Madigan

Book Review: Project Hail Mary by Andy Weir

★★★★☆

Andy Weir has clearly found a formula that works. A brilliant lone scientist stuck in space, who must overcome calamity after calamity in order to survive and hopefully get home.

This time, the story involves space fungi that are eating our sun (technically, it’s more like a space algae, but whatever). The nations of Earth band together and launch a mission to the stars in order to turn the tide on this interstellar parasite.

Our narrator wakes from a coma and doesn’t remember a thing. Where is he? How did he get there? What is his name?

Like Mark Watney before him in the Martian, our narrator is going to have to “science the shit” out of his situation in order to answer all the questions above, and also hopefully, maybe save Earth, too.

Oh, and sprinkle in a bit of first contact as well. Mark Watney never found himself a sidekick while he was on Mars.

Some parts were overly verbose, other parts were cringe-worthy and corny, but this was still an entertaining story I tore through in about 3 days.

If you liked The Martian, you’re going to like this book. If you didn’t, well, sorry. This book is more of that and then some.

Book Review: The Art of Living by Thich Nhat Hanh

This book really spoke to me and it was something I didn’t realize I needed to read right now, at this exact moment of my life.

Maybe it’s because I’m having some sort of pseudo mid-life crisis (because I found my first few gray hairs on my head). Or maybe I’m just perpetually tired thanks to our rambunctious kiddos and trying to keep up with them. Or maybe it’s the COVID doldrums and a feeling of languishing and the constant grind.

But the various topics related to mindfulness and living a happy life that Thich Nhat Hanh covered in this book really resonated with me and I found myself to be much more at peace (and, dare I say, happier) while reading it.

I tried to have a routine mindfulness practice in the past and have fallen off that wagon in more recent times. But I always found myself happier, calmer, and more at peace. Reading this book helped me realize that this is something important that I’ve been missing and I’ve since tried to get back into it.

Here’s an interesting contradiction: I enjoyed this book so much that I didn’t want to finish it. As I started reading through the last half of the book, I really slowed down, because I didn’t want it to end.

Overall, the book can be summed up with the following quote:

“Happiness is not something that arrives in a package in the mail. Happiness does not fall out of the sky. Happiness is something we generate with mindfulness.”

Book Review: Futureproof by Kevin Roose

The first part of this book offers some interesting historical context and insight into how machines have replaced human workers in various ways since the industrial revolution. The second part essentially focuses on how to be a decent human being.

I thought his examples of how automation has / will replace workers was interesting and something to keep in mind when people say that robots will replace our jobs. The more likely scenario is that our positions aren’t filled or replaced when we leave a company due to increases in efficiency.

Some of the author’s personal anecdotes were interesting, if not relatable, as well — as he talks about his constant addiction to his electronics devices and the things he’s done to try and counter it.

Book Review: Do What You Want by Jim Ruland

Do What You Want

★★★☆☆

Bad Religion was probably one of my top 3 favorite bands while growing up as an angsty teenager. As I’ve gotten older, I’ve lost some of my punk rock sensibilities and the desire to keep up with the bands that I used to love so much.

But I have so many pleasant and vivid memories of listening to various albums on full blast in my room or car, while driving around during the sweltering Southern California summers. I remember wearing my cross buster t-shirt and feeling so smug when a fellow student (who went to one of these crazy mega churches) in a high school class asked “why on Earth would you wear something like that?” I remember keeping a dictionary nearby to look up every third word of a song because their wordy lyrics were so ridiculously complex.

And although some of their albums came out half a decade or more before I started listening to them, “Suffer”, “No Control”, “Against the Grain”, and “Generator” were critical components in the sound track of my teenage life.

I think one of the reasons I liked them so much was because their lyrics were a bit more highbrow than the average punk band of the day. It was less “fuck yeah anarchy, smash shit up” and more thought provoking stuff that pondered our existence and place in the universe — for example, these lyrics from “No Control”:

There’s no vestige of beginning, no prospect of an end
When we all disintegrate it will all happen again, yeah
If you came to conquer, you’ll be king for a day
But you too will deteriorate and quickly fade away

Hopeless? Sure! But also a thought provoking message about how the universe and existence is about so much more than just us and what we do? Sure! Excuse me while I go listen to this song real quick.

Anyway, it’s been awhile since I’ve given them a serious listen, so, imagine my surprise when I see a friend add “Do What You Want”, a biography about Bad Religion, to their reading list. A book?! About Bad Religion?!

The book spans 40 years of the band’s history, from their first practice sessions inside a hot garage in the valley, to their most recent album (Age of Unreason). (Have they really been at it for forty years and have something like 17 albums!? It’s really unbelievable to me that these guys are pushing 60 and still at it and enjoying it.)

Despite being fairly emotionless and dry (imagine reading about a history of a band in a newspaper article), this book was a really easy read. There’s nothing scandalous or exceptionally profound within, but it does share interesting anecdotes from tours and recording sessions of every album they’ve put out. And hey, I definitely learned some interesting things about the band!

I also found myself flipping back and forth between this book and then loading up Spotify in order to listen to various songs and albums that were mentioned. I forgot how good some of these early albums are. And I’ve really missed out on some of the more recent stuff. There are some good tunes there.

All in all, the book provided a nice sense of nostalgia and even helped me rediscover some more recent tunes from one of my all-time favorites.

Do What You Want by Jim Ruland and Bad Religion