Here’s a YouTube discussion of the story behind the song, “Brandy, You’re a Fine Girl.”
Alvin Alexander | Java, Scala, Unix, Perl, Mac OS X
“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.
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)
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.)
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.
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 must be a subtype of
Enjoyed Cowboys & Aliens at Wasilla’s fancy new stadium seating movie theater. How strange to walk out of a theater and into a valley of fireweed surrounded by misty mountains.
(A Facebook post from Wasilla, Alaska, August 9, 2011.)
“When you blame others, you give up your power to change.”
~ Possibly said by Robert Anthony first
The new scala-lang.org docs website looks great. It’s also a reminder to me that I probably didn’t stress enough in the Scala Cookbook that everything in Scala is an object, including numbers. (Hopefully I made it clear that functions are objects.) This Scala REPL example shows some of the methods that are available on Scala integers (
“I have already lost touch with a couple of people I used to be.”
~ Joan Didion (full quote here on Goodreads)
The Tower app website has a good description of git fetch vs pull. “You can never fetch often enough” is a helpful phrase.
After yesterday’s Scala nested Option + flatMap/for example, here’s another example of plowing through nested Options with
flatMap. First, start with some nested options:
val o1 = Option(1) val oo1 = Option(o1) val ooo1 = Option(oo1)
Here are those same three lines, with the data type for each instance shown in the comments: