I’m just working through some examples in an Android programming book, and ran across this old Java code. I know things are better in Java 8, but after using Scala, code like this is really painful to look at.

Glad to see they’re finally getting some snow in Alaska.

The following source code shows how to declare that an Android activity is the launcher activity for your application:

This image, copied from this android.com page, shows the suggested Android field naming conventions.

When you need to determine which item in a ListFragment has been tapped/selected in an Android application, this code shows how to do that:

This is how you can show an Android Toast message from a Fragment:

Toast.makeText(getActivity(), "Click!", Toast.LENGTH_SHORT).show();

As shown, don’t forget to call .show() at the end of the makeText method. Forgetting to call show() is a common mistake.

If it helps to see this in more context, this is a complete onListItemClick method from a ListFragment subclass I’m currently working on:

Quiver is a “programmer’s notebook.” Personally I keep all of my notes out here so I can search them easily, but I can see where this app would be good.

This Android.com link shows up to date information on Android market share, including by version, screen size, and OpenGL version.

After doing a little research, it looks like the creators of Android Studio made a quirky decision to want to enforce the use of Java 6 on Mac OS X platforms, presumably to have better font rendering. They did this by putting 1.6* in their Info.plist file instead of 1.6+ (and they’ve done this in more than one version of Android Studio. This image (from this link) shows the suggested way to fix the problem, but you can also edit the Info.plist file to solve the problem.

From this article, here is a list of the best fonts to use for readability and comprehension in printed documents.

Back in 2009 I had a concussion. At some point after that I drove to Illinois to see my family. I was tired after the drive and fell asleep on my sister’s couch, only to be awakened by a loud noise. I opened my eyes and looked in the direction of the noise. A woman standing in the kitchen looked at me and said, “I’m sorry, did I wake you?”

I replied, “Um, that’s okay, no problem.” I didn’t know who the woman was, but she seemed nice, and really sorry for having made the noise.

After she turned and walked away I looked around; I didn’t know where I was. My first instinct was to panic, but I tried not to. I thought hard, “Where am I? Who is that woman?” I’m sure that I also thought, “Who am I?,” but as I write this I remember those first two questions the most.

After at least ten seconds of trying to control my panic and search my memory, it finally came back to me. I was Al, the woman was my mother, and I was at my sister’s house. The panic subsided.

(I write this because of a dream this morning, and because I can only begin to imagine the fear that people with dementia/Alzheimer’s must deal with on a regular basis.)

What programmers say vs what they really mean. From this Twitter post.

Who believes Bill Belichick and Tom Brady about deflategate? Apparently only people who live in New England.

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.)