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

For whatever reason, I get back into yoga every fall, and a favorite book during this time is The Yoga Sutras of Patanjali.

(When I studied by myself I thought his name was pronounced like “pat and jolly,” but when I studied with Judi Rice she taught me it was “pa-tan-ja-lee.”)

The Yoga Sutras of Patanjali

“If you are motivated by a wish to help on the basis of kindness, compassion and respect, then you can do any kind of work, in any field, and function more effectively with less fear or worry, not being afraid of what others think or whether you will ultimately reach your goal.”

~ the Dalai Lama, in this tweet

I don’t know the original source of this image of Darth Vader and Yoda balloons, but I post it here because I’ve been seeing many photos from the Albuquerque Balloon Festival the last few days.

Albuquerque Balloon Festival

As far as I know, there’s no built-in way to remove spaces from a multiline string in Dart, but you can write your own function to do this. For example, I just dug into the splitMapJoin method of the Dart String class, and wrote a stripMargin function like this:

String stripMargin(String s) {
    return s.splitMapJoin(
        RegExp(r'^', multiLine: true),
        onMatch: (_) => '\n',
        onNonMatch: (n) => n.trim(),
    );
}

A little bathroom wall inspiration (in the form of creative writing) for the day. Fear nothing! :)

Fear nothing

Dog wants a second opinion after the doctor says he should be neutered (funny). From Tundra Comics.

“Seize the time. Live now. Make now always the most precious time. Now will never come again.”

~ Jean-Luc Picard

I recently had a discussion with two people I’m working on a book with, where they are essentially very active reviewers. I like to write with enthusiasm, so I made a particular statement in the book. One person said they thought it was motivating — which was my intent — but the other person said it made them wary. I thought it was fascinating to get such different perspectives.

When I was meditating this morning I remembered going on a first date with a girl in high school. We went to a nice restaurant — it had tablecloths and silverware — I don’t currently remember the name of, and sat across from each other at a small, round table.

After a very short while a young boy came up to us and asked, “Are you on a first date?”

My date and I looked at him and said, “Yes, we are.” I started to look around to see where the boy came from, but I couldn’t figure that out.

“It’s okay if you sit closer to each other,” he said.

“Really,” we replied, looking at each other and smiling with surprise.

So I got up and moved my chair around the table until my date and I sat next to each other. “Is that good,” I asked.

“Much better,” he said. “This way you can hold hands.” And then he left.

“Better to be on the edge of a party, don’t you think?” I’m not very good with idle chit-chat in the middle of parties, but I enjoy good conversations around the edges.

Better to be on the edge of a party, don't you think?

James Garner passed away in July, 2014. I know he was in many good movies and tv shows, but I’ll always remember him in The Rockford Files. Every episode had at least one car chase, cigarette smoking, a phone call from a pay telephone, and drinking. In most episodes he was helping a “damsel in distress,” in which he often held her elbow (or upper arm) as they walked. I won’t say it was a great show, but for some reason (him), you just watch it. It was one of the first shows I watched when Netflix came around.

RIP, James Garner

I can appreciate this sentiment, seen outside a local Whole Foods store.

Mom is a survivor

Well played, Photoshopper. :)

Speed checked by Radar

When you want to do a SQL INSERT or UPDATE using the Flutter sqflite package, I’ve found that it’s best to use their insert and update methods (as shown below) so you don’t have to worry about escaping single- and double-quotes. This is similar to the reason why Java developers switched from Statement to PreparedStatement way back in the late 1900s.

As an example, given this SQLite database table:

I like most of Dana Stabenow’s work, and while I didn’t particularly like Dead in the Water, I did enjoy some of the quotes in the book, such as, “Always perform the work that has to be done without attachment,” which comes from the Bhagavad Gita, of which there are many translations (such as this one, this one, and this one).

Always perform the work that has to be done without attachment

“Your time is limited, so don’t waste it living someone else’s life. Don’t be trapped by dogma — which is living with the results of other people’s thinking. Don’t let the noise of others’ opinions drown out your own inner voice. And most important, have the courage to follow your heart and intuition. They somehow already know what you truly want to become.”

~ Steve Jobs

If you want to create a Dart project, probably the best way to do that currently is to use Stagehand:

Once you install that you can create new Dart command-line applications like this:

// create a command-line application
stagehand console-full

However, if you just want to create a little Dart project manually, you can also just follow the steps below:

PHP FAQ: How can I run a PHP script from the Linux/Unix command line?

Solution: To run a PHP script from a Unix command line you can use this syntax:

php -f myscript.php

June 2, 2016: I don’t think my chest is as hairy as Steve Carell’s, but I got three chest-waxings at the hospital last week, and it is really, really painful. (They put the heart monitor leads on, take them off, put them back on, etc.) Someone told me Mr. Carell did this for real for the movie. If so, wow, that’s dedication.

Chest waxing at the hospital (40 Year Old Virgin)

When I went to Texas A&M University, we discovered a restaurant just down the road in Bryan, Texas, called the “Chicken Oil Company.” Once there, we discovered that they made something called a “Deathburger,” known in this photo as the, “Hamburguesa de Muerte.”

The Chicken Oil Company “Deathburger”