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

Impassioned lovers
wrestle as one

Lonely man cries for love
and has none

New mother picks up
and suckles her son

Senior citizens
wish they were young

~ Nights in White Satin

“The way is not difficult. 
Only there must be no wanting, 
or not-wanting.”

~ Chao-chou (Joshu)

“A man of knowledge lives by acting,
not by thinking about acting.”

Carlos Castaneda

By now you know that I think a lot about attitude, and if there are any major secrets to my success, one of them is that at some point I learned that I was smart enough, and aggressive enough, to know when I was right about something. Once I gained confidence in myself, if I was clearly right about something and someone didn’t agree with me, I didn’t hesitate to say, or at least think, “Excuse me, you’re in my way.”

Port covers

Just a few months out of college, I was assigned to a missile project that had to do with something known as “port covers.” In short, port covers are like little doors on the sides of air-breathing rockets. If you’ve seen a little model rocket, or perhaps a firework that shoots up into the sky, you know that a rocket is basically a tube, like the cardboard tube that’s inside a roll of toilet paper. A normal solid rocket motor like this is filled with solid rocket fuel, which is something like a solid version of gasoline.

If you seem to value other people’s opinions over yours, this is another good article from mindful.org: How to Avoid the Empathy Trap.

How to Avoid the Empathy Trap

As a brief note today, here’s a Scala method that writes the strings in a list — more accurately, a Seq[String] — to a file:

def writeFile(filename: String, lines: Seq[String]): Unit = {
    val file = new File(filename)
    val bw = new BufferedWriter(new FileWriter(file))
    for (line <- lines) {
        bw.write(line)
    }
    bw.close()
}

I saw this definition of type safety yesterday in a book named Programming TypeScript and I thought it was very simple and good:

Type Safety: Using types to prevent programs from doing invalid things.

I’m pleased to announce that my book, Functional Programming, Simplified, is now available in three formats:

PDF Format
$25 on Gumroad.com
(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

Kent Beck has a good article on Medium titled, Programmer Test Principles.

Programmer Test Principles (Kent Beck)

One thing about meditation, it brings back some memories that are buried in the depths of your brain/mind. For example, when I was 17 or 18 years old I remember my father and “the woman he got pregnant while he was married to me my mother” having a conversation where they referred to themselves as “survivors.” I further remember thinking, “If throwing your wife and children overboard to save yourself makes you a survivor, sure, you’re a survivor.”

When I left Alaska in 2011 I didn’t have enough room in my car for all of my books, so these are the books I left behind.

Books I sold when I left Alaska in 2011

I used to use wunderground.com all the time. Then, over time, I noticed that it kept getting slower and slower. Out of frustration I looked around for other good weather websites. Today I use accuweather.com.

On the web and with apps, performance — or lack of performance — is important to acquiring and retaining customers.

XO Play is a “thinking man’s” football game that I created for Android devices. It’s for those of us who enjoy thinking about football strategy, of how to take advantage of our strengths and our opponents’ weaknesses, and how to call plays to win games. If you’ve ever watched a football game and thought, “I can call plays better than this guy,” XO Play is for you.

Version 1.4

Version 1.4 introduces four game levels you can choose from:

I’m not sure if this is just a Colorado thing, but there are also a lot of goats around here.

Sheep manure?

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

~ Tina Rasmussen

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

The U.S. wind turbine database

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.

Howling wolf/coyote statues, Santa Fe, New Mexico

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.