“Everybody has a plan until they get punched in the face.”

~ Mike Tyson

Of course any time you think of a beaver in Alaska, you have to think of the “Welcome to Canada” beaver:

“On the road to success there are no shortcuts.” :)

A graphic comparing the Midnight Sun in Barrow, Alaska on June 21 to the Sun in New York City. I think the graphic is a little misleading regarding the high point of the Sun, but it demonstrates the basic idea. Image from this Twitter page.

A great thing about Scala is that you can add data to a Map when you define it, but I don’t know how to do the same thing in Java, at least not easily. The closest thing I’ve been able to come up with is the following, where I define a Map/HashMap in Java, and populate its initial data like this:

“We feel our shell keeps us safe, but it crushes us and others, and keeps out light and Sun.” ~ Taisen Deshimaru

At this rate the population of Alaska will reach one million ... never.

(Bear in mind that these are “summer” numbers. The population in Alaska in the winter is more like 300K or so.) Image from this Twitter page.

Android FAQ: How do I “pin” a screen in Android?

Pinning a screen in Android requires a setting change. Once you’ve made that change, you can “pin” a screen so it is always shown when you log into your Android device. Here’s how to do it.

Android screen pinning setting

To pin a screen in Android, you first have to go into your settings and make a change. So go to the Settings app, then tap Security. When you scroll down you’ll see a “Screen pinning” setting, as shown here:

“I feel like this is the most exciting single year, between the Alzheimer’s in a dish and the Biogen result, since the discovery of the last major Alzheimer’s gene in 1995. So it’s the most exciting year in 20 years.” From this article on harvard.edu.

Android FAQ: How do I write a custom View class in Android? (Or, how do I extend a View class?)

If you need to write an Android onTouchEvent method inside a View class, here’s some example source code (boilerplate/skeleton code) that shows how to implement this method, including how to use the MotionEvent in the method, and how to get the x and y location of the touch event:

I was just looking through some old pictures, and found this “Just be” image that’s written on a chalkboard. It reminded me of my Just Be app, but I remember keeping this photo when I saw it because it reminded me of my yoga instructor, who passed away last December. There were several phrases she would say when we would practice Savasana at the end of a yoga session, and “Just be” was one of my favorites. (Sorry, I don’t know the original source of this image.)

Android FAQ: How do I make my Android app display in landscape mode only?

To get an Android application to display in landscape mode only (to lock it in landscape mode), add this line to your Activity definition in the AndroidManifest.xml file:


For example, I’m writing an Android football game right now, and this is the definition for my main activity in the Android manifest file:

“Do you remember me?”

“Are you here to kill me?”

“I’m here to thank you for saving my life.”

A few lines from a story in the Anchorage Daily News about how a pharmacist helped save the life of a drug addict.

Android FAQ: How do I draw a rectangle in Android?

To draw a rectangle in Android you’ll need to create your own View, i.e., a class that extends the Android View class. For example, this CustomView shows how to extend a View and then use the Rect and Paint classes along with the onDraw method to draw a rectangle:

AppleScript FAQ: How do I enable the AppleScript menu on the Mac OS X menu bar?

To enable the AppleScript menu on the Mac OS X menu bar, follow these steps:

I think this is why I’m supposed to say “climate change,” and not “global warming.” (Snow on May 9th and 10th, 2015.)

If you want to make sure that your users’ Android display stays on while your app is running -- such as if you are writing a game/gaming app -- use this call and flag in the onCreate method of your Android Activity:


Here’s what the Android docs say about the FLAG_KEEP_SCREEN_ON setting: