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

I don’t look at website stats very often, but with a little free time tonight I was just curious how many people in Alaska visit this website. I was glad to see people have visited it from Utqiagvik, Kotzebue, Nome, Fairbanks, North Pole, Unalaska, Bethel, Kodiak Island, Ketchikan, and many other locations. Alaska holds a special place in my heart, and I hope the pages on this site have been useful to the people there.

Happy to serve people in Alaska

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

A friend bought me some of these USB-powered Christmas lights, and I like using them in the winter months, especially on days when it’s snowing, like today. They’d also be a nice “under $20” gift for one of those White Elephant Christmas gift exchange parties.

USB-powered Christmas lights

I was writing some Scala code like this today:

val sb = new StringBuilder
for (b: Byte <- mdOut.digest) {
    val hexString: String = String.format("%02x", b)
    sb.append(hexString)
}
sb.toString

and encountered this error message:

While reading the excellent book, Programming Collective Intelligence recently, I decided to code up the first algorithm in the book using Scala instead of Python (which the book uses). This is a Euclidean distance algorithm, and it provides one way to compare two sets of data to each other, and attempts to score the similarity between the data sets.

Without any further introduction (and assuming you have the Collective Intelligence book), here's the Scala source code for the Euclidean distance algorithm as described in the book:

I was going through some photos recently and came across this one of The Feed Store Church, which is between Alamosa and Monte Vista, a rural area in southern Colorado. I pass it when I drive back home after visiting Taos, Los Alamos, and Santa Fe, New Mexico. I thought it was some sort of a combination of a feed store and a church, but it turns out that it’s a church.

The Feed Store Church

Sometimes during meditation strange things happen. As just one example, this morning I was enjoying a deep meditation, just focusing on the breath ... focusing on the breath ... and suddenly I was standing on a street corner. I looked around briefly, then thought, “What the heck just happened,” and with that thought I returned to my meditation.

While driving back from Golden, Colorado on November 10, 2016, I happened to be listening to Lady Cab Driver by the artist formerly known as Prince, and wondered if these days he would have called it Lady Uber Driver. I thought it was interesting how society in the current moment has an effect on music and writing.

And here’s a gratuitous photo of some cattle on the right and wrong side of the fence near Golden, a big field, and some mountains.

Drive back from Golden, Colorado (and Lady Cab Driver)

If you like cold weather, this photo was taken at the airport I used to live next to in Talkeetna, Alaska.

Five weeks ago.

Talkeetna airport snow, November, 2015

Thanks to some ongoing abdominal pain from my colectomy surgery back in June, I’ve learned what a Trocar device is. Per Wikipedia (and also my surgeon), “Trocars are placed through the abdomen during laparoscopic surgery. The trocar functions as a portal for the subsequent placement of other instruments, such as graspers, scissors, staplers, etc.”

I have pain in the spot where a trocar device was placed, and the theory is that’s because of a combination of scar tissue and a nerve in that area. A backup possibility is that I may have a hernia in that spot, though the surgeon thinks that’s unlikely. I’ll be having a CT scan soon to see if that shows what’s going on.

Speaking as a guy, a nice thing about the local JC Penney is that nobody seems to want to help you. I went in there to look at suits, and nobody bothered me the whole time, which was nice. I’ll ask for help if I need it.

Conversely, I went to the local Dillards to look at suits, and right away someone was all over me trying to make suggestions. Personally I don’t like that. I don’t mind if someone introduces themselves, but then (IMHO) they should leave you alone. Personally I’m much more likely to buy something if you give me time to compare things and make up my own mind instead of trying to sell me on something. As I wrote in A Survival Guide for New Consultants, a good salesperson is really a buyer’s assistant, and sometimes that means giving the buyer space and time to think.

(I left the Dillards pretty quick when it became apparent they weren’t going to leave me alone.)

From this LionsRoar.com article on how to have lucid dreams: “Studies have shown that meditators have more lucid dreams, and for a true meditation master, all their dreams are lucid. We’re non-lucid to the contents of our mind at night to the extent we’re non-lucid to the contents of our mind during the day. Become lucid to your thoughts during the day by practicing mindfulness meditation and you’ll naturally become lucid to your dreams at night.”

As a guy who’s been unconscious seven times I like this, “You have one life” quote. Take it from me, when your lights go out, one of the main thoughts you’ll have is, “I wish I had done <fill in the blank>.”

(The quote appears to be by Beardsley Jones, and the image was put together by tinybuddha.com.)

You have this one life

I enjoyed this National Geographic article about the migrations of the first Americans.

“If you care about someone you have to let them be the person they are, not the person you want them to be. Otherwise, what’s the point?”

~ From an episode of “Death in Paradise”

“Love is not love which alters when it alteration finds.”

~ Shakespeare, Sonnet 116 (as heard in Midsomer Murders)

Apparently on this day in history I checked my mailbox for the first time in several weeks and found this excellent Halloween pumpkin squirrel card. :)

A great Halloween pumpkin squirrel card

Kudos to Samuel Axon of Ars Technica for writing a very good tech review of the hardware behind Apple’s new iPad Pro (2018). As I was reading it, it reminded me of the old style of solid writing that I used to get when I bought print copies of magazines.

One of the nuggets of the article is shown in the image I’ve attached here, where you can see that the 2018 iPad Pro is faster than every MacBook Pro in existence other than its 2018 model, at least in terms of the Geekbench multi-core performance tests. If you dig through the images in the article you’ll see that the story isn’t quite as powerful in the single-core benchmark, where the iPad Pro lags the 2018 MacBook Pro by up to 16%. But in those tests the iPad Pro is roughly the equivalent of a 2018 Dell XPS 15 2-in-1 model. (The older Macs use Intel Core i7 and Xeon W processors, and the Dell model uses an Intel Core i7. The 2018 MacBook Pro uses an Intel Core i9.)

These numbers — comparing a tablet to i7 and i9 processors — make one think that Apple will be using their own chips inside Mac computer systems some time soon.

Great tech review of Apple’s iPad A12X system

If I really liked you back in 2013 you might have received this card from me. :)

You are sweeter than bee vomit

Tim Logan of Texas A&M University has a nice little article on Why you can smell rain.