šŸ‘‹šŸ»  Hello!

Thanks for visiting! You'll find a bunch of musings I've been writing around these parts since the early 2000's. Lately, I've been reviewing a lot of books. But I also write about code and my experiments using generative AI. But really, you're just here to see pictures of Benson.

Blog Posts

TIL: List git branches by recent activity

In both my work and personal coding projects, I generally have a number of various branches going at once. Switching between various branches (or remembering past things I was working on) can somethings be a chore. Especially if I’m not diligent about deleting branches that have already been merged.

Usually, I do something like:

> git branch

Then, I get a ridiculously huge list of branches that I’ve forgotten to prune and spend all sorts of time trying to remember what I was most recently working on.

daves/XXXX-123/enable-clickstream
daves/XXXX-123/impression-events
daves/XXXX-123/tracking-fixes
daves/XXXX-123/broken-hdps
daves/XXXX-123/fix-contacts
daves/XXXX-123/listing-provider
daves/XXXX-123/revert-listing-wrapper-classname
daves/XXXX-123/typescript-models
daves/XXXX-123/inline-contact-form
daves/XXXX-123/clickstream_application_event
daves/XXXX-123/unused-file
daves/XXXX-123/convert-typescript
daves/XXXX-123/convert-typescript-v2
daves/XXXX-123/similar-impressions
daves/XXXX-123/update-node-version

At least 75% of those have already been merged and should have been pruned.

There has to be a better way, right?

Thanks to the power of the Google machine (and Stack Overflow), I found out, there is!

> git branch --sort=-committerdate

Hot diggity dog!

daves/XXXX-123/clickstream-filter-events
main
daves/XXXX-123/convert-typescript-v2
daves/XXXX-123/update-node-version
daves/XXXX-123/similar-impressions
daves/XXXX-123/convert-typescript
daves/XXXX-123/clickstream_application_event
daves/XXXX-123/unused-file
daves/XXXX-123/typescript-models
daves/XXXX-123/listing-provider
daves/XXXX-123/inline-contact-form
daves/XXXX-123/revert-listing-wrapper-classname

That list is now sorted by most recent activity on the branch.

Alright. Even though this is better, that’s still a lot of typing to remember. Fortunately, we can create an alias:

> git config --global alias.recent "branch --sort=-committerdate"

Now all I need to do is just type git recent and it works!

Nice.

Book Review: Palo Alto by Malcolm Harris

I really struggled and finished this out of spite.

I went into it wanting to like it and hoping to learn more about the history of a specific part of California (I recently read and enjoyed ā€œCalifornia: An American Historyā€ by John Faragher and it stoked my interest in looking for more books related to our state).

Oh, wow. What did I get myself into? This book could have been half as long and still tried to make its point: Palo Alto is the center of all evil and suffering on Earth, anyone who went to school at Stanford or started a company there had ulterior motives on world domination and fantasies of oppression, everyone is driven by a profit motive above all else, here’s 1,000 reasons why capitalism is bad, the only way to right the wrongs of the millions that have suffered or been killed due to Palo Alto ideas and inventions is to give the land back, blah, blah, blah.

Okay, Yes! There are unfortunate things that happened due to people and companies in this town that have caused people around the world to suffer. But this is not an exclusively Palo Alto problem, nor is it exclusively a capitalist problem. There are a lot of things that happened or been created here that have also been a benefit and this book just takes every opportunity to tear down and complain… about literally everything.

Maybe 1.5 stars? I am loathe to round up because I think this book is a bit disingenuous in its claims and the author has an axe (probably made in Palo Alto) that they wish to grind.

It’s Friday afternoon, so let’s write a song

My latest generative AI obsession: Suno. You provide it some lyrics, give it a musical style to emulate and hit the create button. It’s pretty wild.

I wrote some fun lyrics about deploying code on Fridays, set to some catchy 80’s pop. The result is pretty crazy.

[Verse]
Testing in production (oh yeah)
That is how we roll (whoa)
Testing in production
using my flawless code

[Bridge]
Why should I write tests (what?)
My code is never a mess (oh no)
Did I just rhyme,
Tests and a mess (yeah he did)

[Chorus]
It’s Friday afternoon.
It’s time to deploy my code. (whoa yeah)
The weekend is almost here.
It’s time to deploy my code. (watch out)

[Verse]
It’s Friday afternoon.
I don’t have anything to fear
It’s time to deploy my code.
The weekend is almost here.

[Bridge]
Why should I write tests (what?)
My code is never a mess (oh no)
Did I just rhyme,
Tests and a mess (yeah he did)

[Verse]
It’s Friday afternoon. (Whoa)
It’s Friday afternoon. (Whoaaa)
It’s Friday afternoon. (Yeah!)
It’s time to deploy my code. (WAIT WHAT)

[Bridge]
Why should I write tests (what?)
My code is never a mess (oh no)
Did I just rhyme,
Tests and a mess (yeah he did)

[Chorus]
It’s Friday afternoon.
It’s time to deploy my code. (whoa yeah)
The weekend is almost here.
It’s time to deploy my code. (watch out)

[Chorus]
It’s Friday afternoon.
It’s time to deploy my code. (whoa yeah)
The weekend is almost here.
It’s time to deploy my code. (watch out)

Tracking the total eclipse shadow

I didn’t get a chance to make it out to see the total eclipse in person this time. (Really bummed… 2017 turned me into a legit umbraphile!)

Earlier today, I pulled down a number of images from NOAA’s GOES-East satellite and compiled this video. It takes a photo every 10 minutes. You can clearly see the Moon’s shadow as it makes its way across North America.

(Protip: Set the image quality to 720p. YouTube’s compression makes that video look like garbage otherwise!)

Pretty awesome!

Somewhat related — in 2020, I compiled a bunch of NOAA imagery that encompassed 3 weeks. I need to get that project up and running again…

Ever changing communication

There was a time (really, the past 15 years or so) where responding to things with an animated GIF was so perfect and encapsulated so much (e.g., if a picture is worth 1,000 words, what is a series of pixelated images moving a 8 frames per second worth?).

For example. see the rise of services like Giphy. I even have a random 10 year old project myself that involves animated GIFs!

Now though, it’s becoming generative AI all the way down.

For example, I just received a meeting invite that increases the frequency of meetings I’m having related to a certain project to… every single day.

Me: Hey, robot! Please create a meme image of a programmer jumping up on a desk and excitedly cheering ā€œMOAR MEETINGS!ā€

Robot:

Now to figure out a way to send it in my place…

Coffee confusion

February 27th, 2024, via the Washington Post:

One of the most striking findings is that coffee drinkers are less prone to developing Type 2 diabetes. Many large studies have found that people who drink three to four cups of coffee daily have about a 25 percent lower risk of the disease compared with people who drink little or no coffee. Your likelihood of developing diabetes decreases about 6 percent for each cup of coffee you consume daily — but only up to about six cups.

March 11th, 2024, via CNN:

Caffeine intoxication occurs when a person has dangerously high levels of caffeine in the system. It creates a spectrum of unpleasant and severe symptoms, such as trouble breathing and seizures. There are a few cases where people have died from caffeine intoxication.

[…]

Caffeine intoxication is more than the headache you get from drinking too much expresso. It happens when people ingest an excessive amount of caffeine. The US Food and Drug Administration defines this limit as anything more than 400 milligrams of caffeine daily for healthy adults. This is equivalent to four or five cups of coffee.

Hometown tidbits: The first modern hydroelectric plant

I’m currently reading California: An American History, by Jack Mack Faragher. There is an interesting historical tidbit that calls out the area where I grew up.

A robust economy pulled migrants to California. That had not always been the case. The economy had grown slowly in the last quarter of the nineteenth century, held back in part by the absence of coal deposits on the Pacific coast. In the 1890s, however, Californians began exploiting other forms of energy that would power a takeoff into sustained economic development.

They first harnessed the power of the water that coursed down the watercourses draining the state’s many mountain ranges. In 1893, utilizing technology developed for the mining industry, the first modern hydroelectric plant in the nation began operation on a fast-flowing creek near the southern California town of Redlands. Local orange growers needed a source of power that would enable them to pump water up into the hills, where they wanted to lay out more groves. The Redlands generating station became the model for dozens of others, many in the Sierra Nevada, designed to provide power for both domestic and industrial use.

Hey, that’s neat! I grew up on a property with a creek near the town of Redlands (and have even done a small bit of research on it back in the ā€˜ol university days).

I wonder… is it the same creek (or rather the bigger creek near this small creek I grew up on). To the Google machine!

Search: ā€œredlands first hydroelectric plantā€

Yup!

Built by the Redlands Electric Light and Power Company, the Mill Creek hydroelectric generating plant began operating on 7 September 1893. This powerhouse was foremost in the use of three-phase alternating current power for commercial application and was influential in the widespread adoption of three-phase power throughout the United States.

[…]

The success of the 3-phase generators at the Mill Creek No. 1 was apparent, for these original generators were used until 1934. Although the original units have been replaced, this plant is still in operation to this day. Today, more than 100 years after Mill Creek’ completion. 3- phase generators are still the primary form of power generation around the world.

Hah, that is pretty cool! I distinctly remember this building from playing nearby and exploring the ā€œwashā€ (as we called the area). You can see it via Google Street View, here, just to the north of Highway 38.

This is just one of the many wonders about this area.

See also: