Alvin Alexander | Java, Scala, Unix, Perl, Mac OS X

FATHER, TALKING TO HIS SON: Life is a pain in the ass. I’ll tell ya’, you know. You work hard, try to provide for the family, and then for one minute ... everything’s good. Everyone’s well, everyone’s happy, and in that one minute you have peace.

SON: Pop ... this isn’t that minute.

~ from the movie, While You Were Sleeping

Happy Twin Peaks Day! (February 24th)

Happy Twin Peaks Day! (February 24th)
Table of Contents1 - Reading the Scaladoc2 - How I think sortInPlaceBy works3 - A sortInPlaceBy example4 - A second example5 - Discussion6 - Summary

When I first looked at the sortInPlaceBy method that was introduced on mutable sequences in Scala 2.13, I couldn’t figure out exactly what it was supposed to do.

Unable to find any examples of “scala sortInPlaceBy” on planet Earth this evening (February 23, 2020), I had to resort to some actual work, and looked at the Scaladoc.

Back to top

Reading the Scaladoc

This is what I see when I look at the Scaladoc for sortInPlaceBy on the ArrayBuffer:

def sortInPlaceBy[B](f: (A) => B)(implicit ord: Ordering[B]): ArrayBuffer.this.type

You can’t see by looking at that method what A is, so I scrolled up to the top of the page and saw this at the beginning of the Scaladoc:

My book, Functional Programming, Simplified — 4.5-star rated on Amazon — is currently on sale in three formats:

PDF Format
Just $15 on
(December sale!)

PDF version of Functional Programming, Simplified

Paperback Book
$39.99 on Amazon

Print version of Functional Programming, Simplified

Kindle eBook
$14.99 on Amazon

Kindle version of Functional Programming, Simplified

“His name’s Chappy.”

His name’s Chappy

For me, seeing the University of Louisville (UL) and Texas A&M play this afternoon must be how it feels to see two of your kids fighting. When I went to UL I lived in the basement of the house on the left, and when I went to A&M I lived in that brick and cinder block place on the right.

As George Costanza would say, “An Al divided cannot stand.”

UL vs Texas A&M (Music City Bowl, 2015)

According to the City of Boulder, Colorado Government Facebook page, this photo from 1866 is one of the oldest known photos of Boulder, Colorado. As someone commented on that page, there are no trees shown in the area. I’m told that pretty much every tree you see in Boulder, Longmont, Louisville, Broomfield, etc., was planted by man.

Boulder, Colorado in 1866

The “Nome National Forest.” The Iditarod race ends in Nome, Alaska, somewhere near here.

If you didn’t realize it, this is actually a joke. What you’re seeing is a bunch of Christmas trees shoved into the snow on top of some sea ice.

The image comes from this Twitter page.

Nome National Forest (an Iditarod joke)

These days it’s “wisdom consultant,” not “guru.”

I found this image on the Cambridge Zen twitter page, and it looks like the image originally comes from

Wisdom consultant

Nansen and Joshu teamed up for some of the best stories in Zen literature. I’ve seen this exchange many times, but this particular translation comes from the book, Making Zen Your Own.

What is the Way? (Nansen and Joshu)

This is the church for the children (el ninos) next to El Sanctuario de Chimayo, just north of Santa Fe, New Mexico.

The church for the children next to El Sanctuario de Chimayo

Seeing that we had another snow storm here in Colorado, I thought I'd share another photo of El Sanctuario de Chimayo in the winter. (El Sanctuario de Chimayo, near Santa Fe, New Mexico)

El Sanctuario de Chimayo, candlelights in winter

As I continue to work through photos, this is a photo of a painting of a church, which I believe I saw in the lobby of the La Fonda hotel in Santa Fe, New Mexico.

Painting of a church, La Fonda hotel, Santa Fe, NM

Famous presidential quotes:

Kennedy: We choose to go to the Moon ...

Reagan: Mr. Gorbachev, tear down that wall.

Trump: Do I look like a guy who needs hookers?

“Always do what you are afraid to do” ~ Ralph Waldo Emerson

Always do what you are afraid to do

A great Harley-Davidson motorycle ad: “If you didn’t have to answer to anyone, what would you do?”

Harley Davidson motorcycle ad: What would you do?

“One woman can make you fly like an eagle, another can give you the strength of a lion, but only one in the cycle of life can fill your heart with wonder and the wisdom that you have known a singular joy.”

~ Twin Peaks

The Flying Squirrel Bakery/Cafe in Talkeetna, Alaska opened right before I moved away from Talkeetna. I used to go there for a cup of coffee while I was writing, and they also served some excellent brick oven pizza. It’s one of the rare restaurants that isn’t in the downtown Talkeetna area. If you’re leaving town, it’s a few miles down the road on your left hand side.

The Flying Squirrel bakery/cafe in Talkeetna, Alaska

This is a terrific photo of the Flying Squirrel Bakery Cafe in Talkeetna, Alaska. The photo comes from this Facebook page, and their website is

Entrance to the Flying Squirrel Bakery Cafe in Talkeetna, Alaska