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

“When the clutter of compulsive thought is cleared away, the light of awareness becomes powerfully bright.”

(Ms. Rasmussen co-wrote the book, Practicing The Jhanas, which is one of my favorite meditation books.)

I remember when the only wind turbines I had ever seen were the ones off of I-65 in Indiana, part of an experiment at Purdue. Now there are over 59,000 of them. I’m not sure why the southeast isn’t participating, but this U.S. wind turbine database is cool.

If you ever need a Java method that returns a boolean value based on a given probability, I can confirm that this method works:

``````/**
* `probability` should be given as a percentage, such as
* 10.0 (10.0%) or 25.5 (25.5%). As an example, if `probability`
* is 60% (60.0), 100 calls to this function should return ~60
* `true` values.
* (Note that Math.random returns a value >= 0.0 and < 1.0.)
*/
static boolean getRandomBoolean(float probability) {
double randomValue = Math.random()*100;  //0.0 to 99.9
return randomValue <= probability;
}``````

I haven’t bought too many statues in my life, but I did buy some of these howling dog/coyote/wolf statues while I was in Santa Fe, New Mexico. They remind me of Zeus and some other Siberian Huskies I have known.

I don’t know what the exact numbers are, but Colorado is growing very rapidly, especially in this area where I live in the cities near Boulder. On a walk today I counted that 66 out of 220 license plates I saw were out-of-state license plates, meaning that a whopping 30% of my neighbors are from out of state and haven’t changed their license plates yet.

In an effort to share some source code (but without taking the time to explain it), here’s some Java source code that I just used to create a JFreeChart chart/graph of some data that I use in my Android football game:

Just before I woke up Wednesday morning I had a particular thought in my head. As I pondered that thought I heard a feminine voice in my head say that good thoughts and bad thoughts are like clouds in the sky. They come and go, and when they’re gone the sky is blue.

After I heard that I laid in bed (still asleep) and wondered if that would be a helpful thing to tell anyone else.

A monk was anxious to learn Zen and said, “I have been newly initiated into the Brotherhood. Will you be gracious enough to show me the Way?”

The Master said, “Do you hear the murmuring sound of the mountain stream?”

The monk said, “Yes, I do.”

The Master said, “Here is the entrance.”

~~~

“Listening intently” is a simple, fun meditation practice. Just sit, relax, and listen to your environment like a dog, cat — or a squirrel in the wild, where your life depends on your listening. At work I used to have fun by listening to as many conversations as I could simultaneously.

Sometimes when I get really sick with the MCAS symptoms it becomes very hard for me to communicate. If I’m with someone else during those episodes and they look at me struggling I think, “I’m still Al, I’m still in here ... I just can’t get the words out.”

I think sometimes that’s the way it is for people when they get older and slow down, or have dementia, I imagine they have those thoughts as well.

We were in the middle of having some bad storms so I walked up to my living room window to see what they looked like. When I saw the clouds I started to say, “Wow, that’s some nasty looking sh-,” when a close lightning bolt threw me back across the room. Lesson learned: Don’t curse at Mother Nature’s designs.

~ June 28, 2013

Let me start by saying that I don’t know if I’m an “A” Player. In part, that definition depends (a) on what work I’m doing, and (b) who you compare me to. For instance, if you compare me to Linus Tourvalds as a Linux C programmer, I’m very clearly not an A Player. Shoot, I’m not even a player.

But if you were to judge me on other skills, I’d like to say that I’m at least a B Player in the things I care about. As I wrote in my book, A Survival Guide for New Consultants, my superpower as a programmer/analyst is empathy; I care about my work, and about my success and my client’s success. If you pay me \$100,000 to do some work, I want you to make at least 2X or 10X or more from my work. I want my clients and sponsors to succeed.

Beyond that care, since I began paying attention to Apple and Jonathan Ive starting back around 2005, I’ve become more interested than ever in quality. When I work on something, I imagine that I’m either working with Mr. Ive, or that I’m going to have him review my work, and I want it to be impeccable.

This is an excerpt from the Scala Cookbook (partially modified for the internet). This is Recipe 14.4, “How to run a shell command from the Scala REPL.”

## Problem

You want to be able to run a shell command from within the Scala REPL, such as listing the files in the current directory.

## Solution

Run the command using the `:sh` REPL command, then print the output. The following example shows how to run the Unix `ls -al` command from within the REPL, and then show the results of the command:

As a little note today, if you ever need to extract a subset of a Java list or array, here are some examples of the Java `subList` method:

This is a photo of a sidewalk in front of an art museum in Santa Fe, New Mexico. (Sorry, I don’t remember the name of the museum and I’m too lazy atm to look it up.)

I applied a Gaussian Blur effect to the cars on the right and the bright stuff at the end of the corridor (using Gimp), and it’s amazing how much that makes the rest of the image “pop” out. Nothing else has been altered.

Dream notes from June 27, 2017: As I feel asleep I was ripped out of my sleep body by some sort of lucid dream tractor beam, then pulled backwards through space. Eventually I came to um ... “somewhere” ... and when I turned my head to see where I was, I found I was being pulled towards a very large, old cathedral. The tractor beam continued to pull me butt-first, right through the closed front doors of the cathedral. Why open a door when you can go through it?

Inside, the tractor beam dropped me off at a spot near some stairs. Somehow I knew what I was supposed to do — this wasn’t punishment, it was a good thing — and I went with a group of other people up the stairs. I saw a few familiar faces and either said “Hey, how have you been?” to them, or nodded to acknowledge others who were farther away.

Walking up the stairs, a woman started talking to me. Most of it was in English, and then some words were in another language. I tried to tell her that the Universal Translator apparently wasn’t translating what she was saying, but to no avail. I remember that two words she said were, “sonó toma,” which Google translates in Spanish as “sleep takes.”

We all filed into a room where I saw a few more familiar faces. We sat in chairs like we were in college again, or more like we were attending a seminar. I thought that was funny, “A seminar for sleep travelers.” I hoped the speaker would be good. Or maybe it would be a series of TED talks for lucid dreamers. Those thoughts made me wonder who organized the event.

I won’t share the rest of what happened, but hopefully I’ll see you at the cathedral one day. :)

“In a world full of people, only some want to fly, isn’t that crazy?” ~ Seal

When I first saw this Dr. Seuss cartoon I thought, “That can’t be real.” But Snopes says it is. And apparently in 2019 people are repeating the same dialog from the 1940s. Geez, these are just kids.

I hope some day in the near future people will realize we’re all children of the same planet.

I was going through old photos recently and found this “Bleeding Heart” drawing that I made on a Buddha Board back in February, 2015. FWIW, Buddha Boards seem to make good Christmas gifts. I got this one as a Christmas gift in 2014.

“My purpose is to serve humanity ... every day is a battlefield ... if you fight with anger, you’re part of the problem, if you fight with joy, you’re a solution. You have to have conviction, ‘Before I die, there will be hearts touched by my spirit.’”

~ Carlos Santana

A wee bit of cause and effect:

I may never have lived in Alaska
if I didn’t first go there on vacation.

I may have never gone to Alaska on vacation
if Colorado wasn’t on fire in 2002.

I may not have thought to go to Alaska in 2002
if I hadn’t discovered Northern Exposure ~1996.

I may never have discovered Northern Exposure
if I didn’t quit a job I didn’t like in 1995.

I may never have discovered Northern Exposure if a tv channel
that doesn’t exist today hadn’t aired it back then.

This keeps going back in time until I was born (or before then),
but that’s the basic idea.