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

I recently created a command I named ffx that lets you search your filesystem for files that contain multiple strings or regular expressions. This post describes and demonstrates its capabilities. (There’s a little video down below if you want to see how it works before reading about it.)

If you need to get a random element from a list in Dart, I can confirm this this getRandomListElement method works:

Functional Programming, Simplified — 4.5-star rated on Amazon — is now available in three formats:

PDF Format
$25 on
(sale price)

PDF version of Functional Programming, Simplified

Paperback Book
$39.99 on Amazon

Print version of Functional Programming, Simplified

Kindle eBook
$29.99 on Amazon

Kindle version of Functional Programming, Simplified

When I woke up this morning I was very refreshed and my brain was quiet, so I decided to meditate. Shortly after that the room got a little busy, and then a terrific Michael Jackson song started playing. As I watched what was going on in the room and listened to the musicians and the lyrics, I realized it was a song that doesn't exist here in awakeland. Stuff like that will make you wonder about the nature of reality.

As a quick note, here are a couple of examples of how to simulate a slow-responding Flutter method:

As a quick note, the Dart ternary operator syntax is the same as the Java ternary operator syntax. The general syntax is:

result = testCondition ? trueValue : falseValue

A few examples helps to demonstrate Dart’s ternary syntax:

“All things that appear in this world are illusion. If you view all appearance as nonappearance, you will see your true nature.”

“There he goes. One of God's own prototypes. A high-powered mutant of some kind never even considered for mass production. Too weird to live, and too rare to die.”

~ Hunter S. Thompson, Fear and Loathing in Las Vegas

Here’s a little example of how to pass a Dart function into another function or method. The solution is basically a three-step process.

Step 1: Define a method that takes a function parameter

First, define a method that takes a function as a parameter, such as this exec method:

As a brief note, if you ever need to use the Flutter CupertinoDatePicker — a spinning wheel chooser — in “time-picker/time-chooser” mode, I can confirm that this example works:

I initially thought you couldn’t pass functions around in Dart (you can!), so I had to remember what we used to have to do with interfaces and inheritance. (See the image.)

Put another way, when you have the ability to pass functions into functions, it eliminates this kind of code interface/inheritance code.

What your source code looks like when you can’t pass functions around

At one point when I was recovering from a surgery I wasn’t feeling very well, so I ended up watching a lot of movies, including 13 Going on 30. I was struck not only by the humor of this particular scene in the movie, but also the empathy. When I worked as a manager, I always appreciated it when employees could see my situation from time to time. It shows a certain maturity that is rare to find in employees.

An example of empathy (from “13 Going on 30”)

When I first studied Zen, I had a very hard time with this concept. I tried to focus very hard on the present moment, and also on being kind, and as a result, I didn’t always do what was really best for the situation. Over time, you figure out how to respond properly.

Zen - Accepting the “just this” of a situation

If you’ve ever had a Siberian Husky, you’ll probably find that these drawings and captions are accurate. (Image from

Siberian Husky body language

After some more medical tests tomorrow (Tuesday) I hope to be able to return to work as early as Wednesday. I don’t really have much energy yet, but hopefully I can get back to writing Scala code and blog posts for two to four hours a day initially.

My ideal job would be to work as a QA guy for the Talkeetna Roadhouse bakery but after getting my full energy back I’ll probably settle for some sort of programming gig instead. :)

The Talkeetna Roadhouse (Talkeetna, Alaska)

The Dancer Upstairs may be a little slow for most other people, but it’s one of my favorite movies (except for the dog parts).

Released in 2002, it was the first or second movie I saw Javier Bardem in, and when you watch it not knowing who he is, you say to yourself, “This guy has it,” that special something that makes you want to watch. As a friend once said, Tom Hanks is like that; if they made a movie about a guy stranded on an island and he was the only one in the movie, she’d watch the movie just because it was him (as did many other people).

The Dancer Upstairs

I was writing with a friend recently about trying to find a way to love all beings, and she sent me this quote:

“I leave you free to be yourself: to think your thoughts, indulge your tastes, follow your inclinations, behave in ways that you decide are to your liking.”

When I read that it made me think something like, “I love you (your spirit), and I acknowledge that you’re a separate being here on Earth. I can’t control you, I can’t make you act in a way that I want you to behave (i.e., in a non-harmful way), so I just have to let you be, so you can work out your own karma.”

For some reason that gives me hope that there is a way I can love all beings (not just the good ones).

Namaste, Al

A few more September colors from Talkeetna, Alaska

September colors, Talkeetna, Alaska

September, 2014, represented a changing of the guard for me. The old Toyota RAV4 was both a good and bad experience, and today I traded it in for the official car of Colorado, a Subaru Outback. As you can see from the photos, the two cars are somewhat similar in design and color. (The top photo was taken in Coldfoot, Alaska, a very small “town” about halfway between Fairbanks and Deadhorse, Alaska.)

Changing of the guard (Toyota RAV4 to Subaru)

At the time of this writing (September 19, 2019), there’s a lot of bad information in books and on the internet about how to use a Flutter FutureBuilder. That bad information caused me to waste a lot of time over the last two days. I don’t have time today to explain everything, but in short, here’s a technically correct FutureBuilder example: