I heard the words “funeral pyre” in the Pink Floyd song One Slip (from their Momentary Lapse of Reason album), and wondered what that was. From Wikipedia I learned that a funeral pyre is “a structure, usually made of wood, for burning a body as part of a funeral rite or execution. As a form of cremation, a body is placed upon or under the pyre, which is then set on fire.”

Dalai Lama quote: “If you want others to be happy, practice compassion. If you want to be happy, practice compassion.” (Image from this link.)

In case you wondered, this is what a Google Nexus 9 box looks like.

Your conference presentation - How you plan it, how it goes. From PhD Comics.

My old iPad 2 was, well, old, and it’s slow speed was driving me crazy. So I decided to buy a new tablet, but when I made that decision I also decided to look around, and in short, I eventually decided to buy a Google Nexus 9. After a few days with it, here’s my review of the Nexus 9.

The Nexus 9 unboxing experience

The Nexus 9 unboxing experience was a non-experience. The Nexus 9 comes in a simple, unattractive box, and there’s nothing special about any part of the unboxing experience.

When I returned to Colorado after five weeks of traveling I found this nice gift from the folks at O’Reilly, a Scala Cookbook cover in a nice frame. :)

I just started using Android Studio 1.x and quickly ran into a problem where I needed to use a Jar file in my Android project. In short, this image shows the steps I followed to import the Jar file into my project. As an important note, I put the Jar file I needed in an app/libs folder, which I created in my project. As the image shows, this affects your Gradle build configuration. (I found this info at this SO link.)

I like this “FIT Scheme” section in the Android documentation. It’s clear and helpful, and provides a nice guideline for when elements should be included in the Android Action Bar.

Here’s a little one-liner I use to backup my iTunes music on my Mac OS X systems:

find . -name '*.mp3' -type f -mtime -365 -print0 | xargs -0 tar rvf ~/iTunesBackup.20150118.tar

The way this works is that I move into the Music folder on my OS X system, then run that command, and it creates the tar file shown at the end of the command. This command copies all *.mp3 files that are under the Music folder that have been modified in the last 365 days into the resulting tar file. If you have files other than MP3 files that you want to back up, or if you want to change the date range of the backup file created, just change (or remove) those options in the find command. Note that the -print0 option is needed to back up filenames and directories that contain blank spaces. (See my Unix/Linux find command examples for many more find command examples.)

“Never let the fear of striking out get in your way.” ~ Babe Ruth

Problem: Java arithmetic involving mixed data types

While working on a math problem in Java just a little while ago, I realized that I wasn’t comfortable with the Java mixed-type division rules. That is, I wondered if the result of this equation:

3 / 2

the same as the result of this equation:

3 / 2.0

or this equation:

3.0 / 2.0

One of my nieces had a homework problem where she had to graph the x and y values of this cotangent equation:

y = 3 * cotangent(4 * x)

I couldn’t remember how to graph things like that just by looking at the equation, so I wrote this Scala “cotangent” program:

Some friends gave me this 18-month calendar.

My best advice to anyone is that any time you’re confronted with fear, face it head on. I have to be reminded of that myself sometimes.

(Caveat: I’m talking about mental fear here, not physical fear. For instance, if you’re face to face with a bear, act appropriately.)

To me there’s often a huge difference between (a) reading something versus (b) being told something to your face. For instance, a Christian might read the line, “Judge not that ye not be judged,” and they could think to themselves, “Oh, I don’t judge people, I’m good.” But then if you’re with them and they say something bad and you slap them in the face and yell, “Stop judging your sister!,” or, “Stop judging your brother (or your friend),” they will realize that they’re actions don’t line up with their beliefs.

“Husbands choosing paint colors must have a note from their wives.” Funny, and probably a very good idea.

In the amazing world of statistics, Internet Explorer market share correlates extremely well to murder rate. Image from this Twitter link.

Because of personal reasons I have a fair amount of free time at the moment, so I started converting some algorithms in the book, Programming Collective Intelligence, from Python to Scala.

As a quick note today, this is the source code for a Raspberry Pi (RPI) camera module shell script that I created so a friend can turn her Raspberry Pi camera on and off from the RPI command line (Linux command line):

As a quick Scala example, I just needed to write a “sum of the squares” algorithm for a “Pearson Correlation” function I’m working on, and initially wrote it like this using map and sum:

val sumOfTheSquares = movieRatingsMap.values.map(rating => Math.pow(rating, 2)).sum

If you know that movieRatingsMap is a Map of movies and my ratings of those movies, I think that line of code is fairly easy to read. That line can also be written like this