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

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.

Do you hear the murmuring sound of the mountain stream?

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.

Santa Fe, New Mexico art museum sidewalk

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.

Dr. Seuss — Adolf and the Wolf cartoon

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.

Bleeding heart (on a Buddha Board)

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

On June 26, 2012, there were several fires in the mountains near Boulder, Colorado.

Fires in the mountains near Boulder, Colorado

For anyone interested in the radioactive iodine treatment instructions I received from the hospital back in 2014 (for the post-surgical treatment of thyroid cancer)(which I’ll be going through again), here you go. As I note in the image, as a writer I appreciate the strong finish. :)

Radioactive iodine treatment instructions (for thyroid cancer)

I first saw this Senility Prayer at my wife’s grandparents’ house many moons ago, and it still makes me smile.

Senility Prayer

“When we look up at night and view the stars, everything we see is shining because of distant nuclear fusion.”

~ Carl Sagan

This article on When to use Web Workers had this good chart that shows that smartphone CPUs aren’t hitting a performance wall in the same way that PC CPUs did in 2005.

Smartphone CPUs are still getting significantly faster

It’s great to see wealthy people trying to save the environment. Per this CNN.com story, “Pink Floyd's David Gilmour auctioned 126 of his guitars for a record-breaking $21 million at a New York charity auction Thursday to fight against climate change.” Indianapolis Colts owner Jim Irsay bought the “Black Strat” for ~$4M, and apparently he’s going to make it available to the public.