Scala, Java, Unix, MacOS tutorials (page 76)

The funny thing about writing the Scala Cookbook is that it started as a whim. I was just about to leave for a vacation at the beach, and right before I turned off the computer a thought flashed in my mind, “I should contact the people at O’Reilly about writing a cookbook for Scala.” I then had a doubt that they would actually do it, but I applied the “What the heck” rule — i.e., “What the heck, what do I have to lose?” — and sent the email.

I dug around the internet for a few minutes, found the correct O’Reilly email address, sent them a message, turned off the computer, and drove to the beach. While I was at the beach the publisher wrote and said, “Love it, send me a full proposal!”

So if you’re thinking about doing something, but are afraid or uncertain about doing it ... apply the “What the heck” rule, and give it a shot. :)

“Ever notice that 'What the heck?" is always the right choice?”

Quote from Nancy Davis, design by Robin Williams, in the book, The Non-Designer's Design Book.

Ever notice that ‘What the heck?’ is always the right choice? (Nancy Davis)

As a little mini-project I wanted to count the number of lines of source code in the Second Edition of the Scala Cookbook as compared to the First Edition. To do this I wrote the following Scala program/script to count the lines between the ---- and .... sections in the AsciiDoc files that represent the old and new versions of the book:

I like this quote from Leo Buscaglia: Take responsibility and grasp it. Don’t be a victim.

I’ve written it before, but Mr. Buscaglia was a significant, positive influence on my life. There was a lot of negative and downright mean programming going on in our household when I grew up — negative role models on both sides of the family — and Mr. Buscaglia was an extremely helpful antidote to that, helping me to see that not everybody was like my relatives.

Leo Buscaglia: Take responsibility

This tweet shows that the traffic jam trying to get to the outdoor hockey game at the Air Force Academy last night was a disaster. And in this tweet, a young woman demonstrates a Babe Ruthian swing.

“The meaning of ‘Hatha Yoga’ is Sun (Ha) and Moon (Tha), Yoga in which Sun is the soul and Moon is consciousness. Consciousness can be compared to a lens. Its inner surface faces the soul itself, and its outer surface comes in contact with the world. Inevitably a degree of grime attaches itself to that outer surface and obscures our vision. In fact it prevents us from seeing clearly what is outside, and it equally prevents the light of our soul from shining out. If our house is gloomy because the windows are dirty, we don’t say there is problem with the Sun; we clean the windows. Yoga cleans the lens of consciousness in order to admit the Sun.”

~ probably from the book, Light on Life, by B.K.S. Iyengar

Back on the first day of June, 2007, I moved to Talkeetna, Alaska, and just a few days after I moved into my cabin, a huge fire that was larger than cities like Louisville, Kentucky or Denver, Colorado, started to the west of Talkeetna. I took this photo at the top of the hill that overlooks Talkeetna.

Huge fire in Alaska (June, 2007)

“Yoga is the cessation of the fluctuations of consciousness. The still mind is by definition, pure.”

“Is this the end? Are we there yet? No. There remains the ego, the self, the known self, the impersonator of the Soul. He is the last actor to leave the stage. He lingers even for the very final hand clap of applause. What forces him off the stage? Silence, and retention of the breath.”

~ From the book, Light on Life, by B.K.S. Iyengar

Here’s another photo of the Moon rising over the Atlantic Ocean, Virginia Beach, Virginia.

Moonrise over the ocean, Virginia Beach (#2)

“Karma means action and action motivated by compassion is good. To complain that what happens to you is just the result of your karma is lazy. Instead, confidently recalling the advice that, ‘You are your own master,’ you can change what happens by taking action.”

~ the Dalai Lama, on this Facebook page

If the Houston Astros want to do the right thing, they should just tell opposing batters what pitch is coming. For every at-bat during the season. If they can win the World Series that way, more power to them.

I can’t remember the name of the motel where I saw this, but this is a photo of a painting of sled dogs that I came across in Healy, Alaska, just north of Denali. (I remember the motel because I used to work with a nice guy named Carson, and a guy that could have easily passed as his twin brother worked there.)

Sled dog painting in Healy, Alaska

If you want to create multiple Scala Futures and merge their results together to get a result in a for comprehension, the correct approach is to (a) first create the futures, (b) merge their results in a for comprehension, then (c) extract the result using onComplete or a similar technique.

“You are destined to be together forever.”

“You are destined to be together forever”

And to all a good night ... a photo of a sunset over the Rocky Mountains in Boulder, Colorado, October 4, 2012.

And to all a good night (a Rocky Mountain sunset)

Way back in the late 1970s and early 1980s the U.S. economy wasn’t doing very well, and Dr. W. Edwards Deming wrote about his 14 Points for Management as a way to improve the economy. (The image shown comes from that link at deming.org.)

Deming's 14 Points for Management

As seen in Boulder, Colorado. :)

Wish you were here

Every year about this time — late winter, early spring — I have to fight the urge to move back to Alaska. If you ever happen to drive up there you might come across this “North to Alaska” sign.

North to Alaska sign

If you like cold weather, this photo was taken at the airport I used to live next to in Talkeetna, Alaska.

Five weeks ago.

Talkeetna airport snow, November, 2015