Punk Rock Obama

I think it’s time to end my AI art career on this high note. Generated with Stable Diffusion, running on my local machine.

The prompt:
“beautiful portrait painting of Barack Obama with a purple mohawk on top of his head shredding on an electric guitar at a punk rock show, concept art, makoto shinkai, takashi takeuchi, trending on artstation, 8k, very sharp, extremely detailed, volumetric, beautiful lighting, wet-on-wet”

Punk Rock Obama

Book Review: The Anthropocene Reviewed by John Green

I’m just going to start off and say that this was a beautifully written book and it really struck a chord with me.

The Anthropocene Reviewed is a collection of essays adapted from a number of episodes from John Green’s podcast. I hadn’t actually heard of the podcast before, so the material in this book was new to me. Each chapter in the book is a review of a different subject on something created by or affecting humankind.

Everything from Dr. Pepper and Canadian geese to the Notes app on our phones and the Internet in general. The chapters are part review and also part historical research. I just loved it. I think part of the reason I enjoyed this book was because we’re roughly the same age. So, a number of his thoughts and experiences roughly correlated with my own. “Are you me?!” is something I thought a number of times in the book.

Take, for example, his review of Super Mario Kart:

I was in tenth grade when Super Mario Kart was released, and as far as my friends and I were concerned, it was the greatest video game ever. We spent hundreds of hours playing it. The game was so interwoven into our high school experience that, even now, the soundtrack takes me back to a linoleum-floored dorm room that smelled like sweat and Gatorade. I can feel myself sitting on a golden microfiber couch that had been handed down through generations of students, trying to out-turn my friends Chip and Sean on the final race of the Mushroom Cup.

We almost never talked about the game while playing it—we were always talking over each other about our flailing attempts at romance or the ways we were oppressed by this or that teacher or the endless gossip that churns around insular communities like boarding schools. We didn’t need to talk about Mario Kart, but we needed Mario Kart to have an excuse to be together—three or four of us squeezed on that couch, hip to hip. What I remember most was the incredible—and for me, novel—joy of being included.

That rang so true.

Another chapter of the book reviews Canadian geese. Fun fact: growing up, my mom had a flock of (non-Canadian) geese in our yard. The wings were clipped, so they couldn’t fly away. But I have distinct memories of them running after me in the backyard, pecking at my legs and back. And that awful honking. It’s no wonder that I really think that geese are the worst animals in the world.

But even though Canada geese are perfectly adapted to the human-dominated planet, they seem to feel nothing but disdain for actual humans. Geese honk and strut and bite to keep people away, even though they’re thriving because of our artificial lakes and manicured lawns. In turn, many of us have come to resent Canada geese as a pest animal. I know I do.

Image of how I remember what my mom’s geese looked like. Probably. Image generated using Midjourney AI.

The Anthropocene Reviewed is of my favorite books that I’ve read this year.

The Anthropocene Reviewed by John Green

Quickly bootstrapping a new Node.js project

A problem that often happens to me: I get the inspiration to whip up something in Node.js  (for fun, for experimentation, for a side project, etc) but then I realize that I need to go through the process of actually setting things up before I can even start writing some code.

Usually, I have to dig through previous projects and copy over my eslint and prettier config files, read through some documentation and remember how to setup TypeScript again, install the correct dependencies for running tests. Before I know it, I’m bored and tired and no longer interested in doing whatever I was going to do.

I decided to experiment with some command line tools and created a Node.js script that can help me quickly bootstrap a new project with common configuration parameters that I use. It’s available on GitHub: Bootstrap Node Project.

The GIF above shows this tool in action. I’m able to get the scaffolding for a new project up and running within about 20 seconds! After running, the project structure looks like this (with associated npm start and test scripts, all ready to go). That is pretty awesome.

my-cool-project/
├─ .husky/
├─ node_modules/
├─ src/
│ ├─ index.js (.ts)
│ ├─ index.test.js (.ts)
├─ .eslintrc.json
├─ .gitignore
├─ .prettierrc
├─ package-lock.json
├─ package.json
├─ README.md
├─ tsconfig.json (optional)

Obviously, it’s highly opinionated and caters to configuration options that I personally like to use. But I figure it’s a great resource for anyone who wishes to roll their own utility to quickly bootstrap projects as well.

 

MidJourney – AI Art Madness

A few short weeks ago, I had downloaded a simplified model for generating AI-created images on your local machine. The internet (myself included) had a lot of fun with it, but the quality was definitely lacking, especially when compared to the more serious AI image platforms being created by some big companies.

I recently received my invite to the MidJourney beta and I am just blown away!

For now, I’ve just been putting in ridiculous prompts that simulate styles for various artists (oh, man. I have a feeling this is going to piss off a lot of artists in the future…)

For example: “Apocalyptic wasteland with crumbling buildings and debris, thomas kinkade painting”

The potential here is pretty crazy — for people who aren’t artistically inclined, they can start generating images and scenes based on what they come up with. Some people can probably use this as a base to get to rapidly start iterating on new ideas. And of course, others are going to be mad.

A lot of the detail in creating these images is how you create the prompt. You’re already seeing the phrase “prompt engineering” being used in various places — check out this Twitter search.

For me though, I’m excited about this new technology and it’s something I’ve been eager to play with.

Book Review: Moonwalking with Einstein by Joshua Foer

Josh Foer’s book starts out by looking into an esoteric competition featuring mental athletes competing in various memory competitions. Along the way, he discovers interesting mnemonic tricks for memorizing various types of things and follows a group of people who frequently compete in these events. With dedicated practice, he uses this effort to win the United States Memory Championship just a year later!

While Foer’s book documents his journey in becoming a mental athlete, it also features a number of interesting asides that dive into the latest research in memory and explores how and why humans are good (and not so good) and remembering various types of things.

The book opens with what seems like a non-sequitur:

“Dom DeLuise, celebrity fat man (and five of clubs), has been implicated in the following unseemly acts in my mind’s eye: He has hocked a fat globule of spittle (nine of clubs) on Albert Einstein’s thick white mane (three of diamonds) and delivered a devastating karate kick (five of spades) to the groin of Pope Benedict XVI (six of diamonds). Michael Jackson (king of hearts) has engaged in behavior bizarre even for him. He has defecated (two of clubs) on a salmon burger (king of clubs) and captured his flatulence (queen of clubs) in a balloon (six of spades). Rhea Perlman, diminutive Cheers bartendress (and queen of spades), has been caught cavorting with the seven-foot-seven Sudanese basketball star Manute Bol (seven of clubs) in a highly explicit (and in this case, anatomically improbable) two-digit act of congress (three of clubs).”

You read this and immediately think, “what?!” But! There’s a method to this madness. It’s a specific technique that Foer describes later in the book. He’s built a “memory palace” to make recalling a list of items easier. It’s something I hadn’t heard of before and is an interesting concept.

Foer describes a memory palace as:

“The idea is to create a space in the mind’s eye, a place that you know well and can easily visualize, and then populate that imagined place with images representing whatever you want to remember. Known as the “method of loci” by the Romans, such a building would later come to be called a “memory palace.”

[…]

When we see in everyday life things that are petty, ordinary, and banal, we generally fail to remember them, because the mind is not being stirred by anything novel or marvelous. But if we see or hear something exceptionally base, dishonorable, extraordinary, great, unbelievable, or laughable, that we are likely to remember for a long time.

The more vivid the image, the more likely it is to cleave to its locus. What distinguishes a great mnemonist, I was learning, is the ability to create these sorts of lavish images on the fly, to paint in the mind a scene so unlike any that has been seen before that it cannot be forgotten. And to do it quickly. Which is why Tony Buzan tells anyone who will listen that the World Memory Championship is less a test of memory than of creativity.

When forming images, it helps to have a dirty mind. Evolution has programmed our brains to find two things particularly interesting, and therefore memorable: jokes and sex—and especially, it seems, jokes about sex.

While there’s no secret to easily unlocking a flawless memory, I found this book really enjoyable to read and thought some of the techniques for recall were pretty useful.

As far as the title of the book goes — it ultimately has nothing to do with Einstein. It’s related to using a mnemonic technique he used for remembering a set of cards (in this case, a four of spades, king of hearts, and three of diamonds).


“Moonwalking with Einstein” image generated using Midjourney AI.

Moonwalking with Einstein, by Joshua Foer

Generating art using AI

Earlier this year, OpenAI announced DALL-E 2, the latest version of their AI tool that can generate images by simply providing text input.

For example, “people in togas taking a selfie in front of a volcano”, and it will get to work attempting to create an image that includes all these elements.

The Verge has an interesting article with more details. You can see an example of what is possible on the DALL-E 2 subreddit. It’s honestly insane.

For now (sadly), the service is invite only.

More recently, an ambitious engineer named Boris Dayma created an open source version of the service called DALL-E mini. While it isn’t able to generate results as impressive as DALL-E 2, it’s still pretty crazy!

It’s recently taken the internet by storm and you can see people post DALLE-mini generated images and memes everywhere. The official website has been under heavy load, so it’s been pretty tough to try out the service.

Fortunately, you can download the model from Github and get the service setup on your local machine (providing you have a graphics card beefy enough to run the models).

Who has two thumbs and a graphics card just begging to be used? Hello.

I was able to get the service setup on my machine and start playing around with it.

In this example, I used a prompt to essentially create a Bob Ross painting generator. “Alpine forest with river running through the middle, snow capped peaks in the background, Bob Ross style painting.”

Dalle mini forest

Pretty neat! The images that services like DALL-E 2 and Midjourney can create are miles better and I’ve applied to both services.

While I anxiously await my acceptance, I’ll have to continue generating various memes on my own machine.

Monkeys

Redactle – It’s like Wordle but for censored WIkipedia articles

Thanks to a coworker, my latest obsession is Redactle. Each day, it takes one of the 10,000 most popular articles from Wikipedia and censors every word that isn’t a common preposition or article. Each time you make a correct guess, the word is uncovered, slowly revealing more and more of the article. It’s sick and  it’s fun.

Essentially, this turns into an all day affair as I take breaks and then come back to try and solve the puzzle. Yesterday, I determined the article was about “Sparking Wine” after about 276 guesses… 🙀

Get guessing!

Fun with GPT-3

Earlier this evening, I was playing around with OpenAI’s GPT-3 language model for generating “human-like text.”

I gave it the following prompt:

Write a plot about a movie that involves rogue unicorns who want to
conquer Earth and the planet’s only hope is an Australian Cattle dog named Benson who sleeps a lot.

The response?

The unicorns, led by their king, Uni, have been planning their conquest of Earth for years. They have been observing the humans and have concluded that they are weak and vulnerable. The unicorns have developed a powerful magic that will allow them to take over the planet.


Benson, an Australian Cattle dog, is the only one who can stop them. Benson is a lazy dog who loves to sleep. He is content to spend his days lounging around and eating food. However, when the unicorns begin their attack, Benson is the only one who can stop them. He rallies the other dogs and leads them in a fight against the unicorns.

The unicorns are powerful, but they are no match for Benson and the other dogs. Benson is able to defeat Uni and the other unicorns, and the Earth is saved.

Summer blockbuster coming soon to a theater near you!

Creating an automated Twitter bot about gun violence

The school shooting in Uvalde last week was horrible. As a parent, I feel so powerless to protect my kids from something like that. Taking them to school the next day was extremely emotional.

It’s clear that we, as a country, are going to continue to do nothing about guns and gun violence. I channeled some of my emotion into building an automated bot for Twitter. I call it SABSStochastic Analysis for Ballistics Superfans (alternative title is “Second Amendment Bullshit”).

If you’re so technically inclined, you can download and run it yourself. Powered by Node and a fun little experiment into Twitter’s API.

It automatically replies to any congressional member who tweets.

Which of course includes unhinged Republicans.

Book Review: Columbine by Dave Cullen

The recent horrific (and all too frequent) school shooting in Uvalde is shocking, sickening, and absolutely impossible to understand. I can’t even begin to imagine what the parents of those children are even going through.

Dropping my kids off at school the day after this happened was especially emotional. I wasn’t the only parent wiping tears away from my eyes as we waved good bye to our little ones.

In an effort to try to understand more about these sorts of tragedies, I decided to read about the event (that I feel like) started this madness: the tragedy at Columbine.

I have a vague recollection of hearing about the news. I was in high school myself at the time, and I remember leaving school a bit early for a volleyball match against another school. As we were loading up the bus and getting ready to depart, I heard another student ask if anyone heard about “what happened at a high school in Colorado?”

At the time, we had little information and kind of just filed it away in the back of our mind.

It wasn’t until I got home later that night that I began to understand just how horrific it was. The media was quick to come up with scapegoats: music, video games, trench coats, loners who were bullied, etc.

We tried to comprehend it, even though we couldn’t. We also couldn’t imagine something like that happening again because it was so egregious. It was a random, unfortunate (and terrible) act, designed to inflict terror. We would move past it.

And we did… for a bit.

And then the school shootings kept happening. (And mass shootings in general.)


Dave Cullen’s book does a deep dive into the events around the massacre at Columbine — using journal entries and videos recorded from both the shooters and evidence sourced from the Jefferson County Sheriff’s Office. He creates a detailed timeline of the things that actually happened that day, and how the city has since tried to recover.

One of the things that stood out to me at first was how shockingly… normal Eric seemed. He had a lot of friends, got good grades, had girlfriends, and people generally had nice things to say about him. Deep down though, he was a true psychopath with a deep seated anger toward everything and everyone.

When he and Dylan were caught stealing electronic equipment from someone’s work van one night, they were assigned community service work and ordered to attend counseling services.

According to the counselors notes, he excelled at the program and always said the right things and displayed the right amount of humility and sorrow for what he had done. At the same time, he was writing in his journal at home about how much he hated the world and wanted everything to burn.

Eric was a full on psychopath in every sense of the term. A section in the book dives into this history of this psychological phenomenon.

Psychopaths are distinguished by two characteristics. The first is a ruthless disregard for others: they will defraud, maim, or kill for the most trivial personal gain. The second is an astonishing gift for disguising the first. It’s the deception that makes them so dangerous. You never see him coming. (It’s usually a him–more than 80 percent are male.) Don’t look for the oddball creeping you out. Psychopaths don’t act like Hannibal Lecter or Norman Bates. They come off like Hugh Grant, in his most adorable role.

In the wake of these mass shootings, people often talk about warning signs and mental health issues (but never the easy access to guns and the carnage they cause, because God forbid we ever talk about those). I myself have thought, “if only this person could have gotten therapy or been helped earlier, it might have changed things.”

Cullen digs into this with a simple answer regarding true psychopaths: it doesn’t work. An excerpt from the book:

Dr. Hare’s EEGs suggested the psychopathic brain operates differently, but he could not be sure how or why. […] Dr. Kent Kiehl wired subjects up and showed them a series of flash cards. Half contained emotionally charged words like rape, murder, and cancer; the others were neutral, like rock or doorknob. Normal people found the disturbing words disturbing: the brain’s emotional nerve center, called the amygdala, lit up. The psychopathic amygdalae were dark. The emotional flavors that color our days are invisible to psychopaths.

Dr. Kiehl repeated the experiment with pictures, including graphic shots of homicides. Again, psychopaths’ amygdalae were unaffected; but the language center activated. They seemed to be analyzing the emotions instead of experiencing them.

So what’s the treatment for psychopathy? Dr. Hare summarized the research on a century of attempts in two words: nothing works. It is the only major mental affliction to elude treatment. And therapy often makes it worse. “Unfortunately, programs of this sort merely provide the psychopath with better ways of manipulating, deceiving, and using people,” Hare wrote. Individual therapy can be a bonanza: one-on-one training, to perfect the performance. “These programs are like a finishing school,” a psychopath boasted to Dr. Hare’s team. “They teach you how to put the squeeze on people.”

To me, that was one of the most frightening passages in the book.

I don’t think this book helped me understand why these sorts of things continue to happen — can anything really do that? That said, it was a fascinating piece of investigative journalism that pieced together material from a variety of sources. I can’t say I enjoyed reading it (because the contents are obviously tragic and heavy), but I felt that it was interesting and informative.