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

I get to have another operation (surgery) next week, but I still hope to have the next version of my book on Scala and functional programming available by the end of the month.

If you’re interested in packaging Java applications on macOS, this is a good `javapackager` video on YouTube.

javapackager video (macOS and java)

As a note to self, this apple.com Maintaining Your Signing Identities and Certificates page contains information on signing identities, certificates, provisioning profiles, developer accounts, developer id certficates, the keychain access app, exporting certificates, and more.

Apple: Maintaining Your Signing Identities and Certificates

Zachary: I ran into one of my brother’s work buddies, he introduced me to Tai Chi. It saved me.

Longmire: How so?

Zachary: I like to put it like this ... I went to church a lot as a kid, and we were always taught to love our enemies. Tai Chi taught me something new — to love the enemy inside me, as well. So I don’t look at peace as the absence of conflict any more. I see it as the acceptance of conflict.

(From the tv series Longmire)

Table of Contents1 - Building a MacOS application bundle with javapackager2 - The longer story3 - The Mac/Java class4 - The three scripts5 - javapackager notes

I recently learned how to use the Java javapackager command to build a macOS application bundle — i.e., a regular macOS application — from a Java application. In this tutorial I’ll show how to create a Mac application bundle from a simple Java class, in this case a Java Swing class.

I don’t remember the original source of this image, but I like it: “I need to find more people who will sit and talk about the universe and souls and consciousness with me for hours.”

When I saw this again today I was reminded of the time I ended up in Vail, Colorado.

I need to find people who will talk about the universe and souls

Here’s a YouTube discussion of the story behind the song, “Brandy, You’re a Fine Girl.”

“Because I was afraid of worms, Roxanne! Worms!”

I was surprised to learn that when you sign a macOS application, the signing process doesn’t sign every file under the .app application directory. Here’s a quote from the Apple developer docs:

“Your app’s executable code is protected by its signature because the signature becomes invalid if any of the executable code in the app bundle changes. Note that resources such as images and nib files aren’t signed; therefore, a change to these files doesn’t invalidate the signature.”

I live in Colorado, where cellular reception can be very hit or miss. As just one example there are only two spots in my apartment where I can make a phone call. So when I’m at home trying to view a website using Safari on my iPhone and the page is loading really slow, I find it really annoying that my iPhone is trying to use my cellular data rather than my home wireless network (WiFi).

Note: Apple implies that the cellular data is “assisting” the WiFi, but with the poor cell reception here, I can confirm that this feature just slows down my iPhone internet speed.

Besides books on sports, the first book I remember reading that wasn’t assigned to me by a teacher is Man’s Search for Meaning, by Viktor Frankl.

Viktor Frankl: Man's Search for Meaning

Over the last two days I’ve gotten a Mac/Java app ready for Apple’s Mac App Store, including bundling the application as a macOS “.app” application bundle, and signing it so it can be submitted to the Store.

A relatively quick look at my browser history shows that I needed to hit over 260 URLs to get that done. As a wise professor once told me, “Keep learning, keep learning.”

“The lurking suspicion that something could be simplified is the world’s richest source of rewarding challenges.”

~ Edsger Dijkstra (as seen on twitter yesterday)

SBT 1.0.0 is now available. See this Lightbend page for more details.

SBT 1.0 is now available

My personal motivational speaker. I disccovered him on a trip to Los Alamos. (Sadly, the bookstore in Los Alamos where I found him is no longer in business.)

Albert Einstein doll

Some people in Colorado crack me up. A recent conversation:

Me: Yada yada yada, I have an autoimmune disease.

Other: You should try marijuana.

When Mrs. Albert Einstein was asked if she understood her husband’s Theory of Relativity, she replied, “No ... but I know my husband, and he can be trusted.”

I was just reminded of Rubber Duck Debugging. From this Wikipedia link, “The name is a reference to a story in the book The Pragmatic Programmer in which a programmer would carry around a rubber duck and debug their code by forcing themselves to explain it, line-by-line, to the duck.” For me, my rubber duck is Albert Einstein.

Rubber Duck Debugging

Knowing of my interest in Zen, a friend of mine sent me this photo of a letter from Albert Einstein to a parent grieving after the loss of a child:

Albert Einstein, Zen Master

In today’s installation of “how to have fun with Scala,” if you want to define a method that takes a parameter that has a generic type, and want to further declare that the parameter must extend some base type, use this syntax:

def getName[A <: RequiredBaseType](a: A) = ???

That example says, “The parameter a has the generic type A, and A must be a subtype of RequiredBaseType.”