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

The next version of my book, Learning Functional Programming in Scala, is now available. See that link for details.

Table of Contents1 - What’s new (June 25, 2017)2 - Buying the book3 - One more thing4 - Preview5 - Some time in the future ...

My new book, Learning Functional Programming in Scala, is currently available as a PDF you can purchase for just $10 US. (The price is going up to $25 this Saturday.) Details are listed below.

Back to top

What’s new (June 25, 2017)

If you’ve been following along with me recently, the latest changes are:

“Being rich isn’t a privilege. Being rich is a right. If you create massive value for others, you have the right to be as rich as you want.”

~ Steve Siebold, How Rich People Think

“The most important thing I found out from (my father) is that if you asked any question and pursued it deeply enough, then at the end there was a glorious discovery of a general and beautiful kind.”

~ No Ordinary Genius: The Illustrated Richard Feynman

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), here you go. I appreciate that the last four words are, “if you should die.”

Radioactive iodine treatment instructions (for thyroid cancer)

Wow, this radiation is good stuff. I just woke from a very long dream sequence where I was in three and then four dimensions, all at one time. It was similar to what happened to Picard in the last episode of STNG. In my case I was trying to help the people in the third dimension, who I originally thought may have had an earthquake, but as I later found out, they were in some sort of battle or war. As Spock would say, fascinating.

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. :)

This drupal.org page shows how to update Drupal 8 using drush and other techniques.

Here’s a link to Github’s 2017 Open Source Survey.

Update 1: The next version of my book on Scala and functional programming will be released later this week.

Update 2: The price of the book will be increased to $25 on July 1, 2017.

In “Eat, Pray, Love,” Elizabeth Gilbert describes what meditation can be like. :)

What meditation can be like (Eat, Pray, Love)

“Researchers report that mindfulness meditation reduced chaotic activity in the brain and the heart ... ‘Activities of the brain and heart became more coordinated during MBSR training,’ reported the authors. ‘Mindfulness training may increase the entrainment between mind and body.’”

“Erlang has single-assignment variables. As the name suggests, they can be given a value only once. If you try to change the value of a variable once it has been set, you’ll get an error.”

(“Single-assignment variables” are the same as val fields in Scala. Using them can make your code more like algebra.)

“In Erlang, processes share no memory and can interact with each other only by sending messages. This is exactly how objects in the real world behave.”

“Processes interact by one method, and one method only, by exchanging messages. Processes share no data with other processes. This is the reason why we can easily distribute Erlang programs over multicores or networks.”

Joe Armstrong, in his book,
Programming Erlang: Software for a Concurrent World

“In Erlang (Akka), it’s OK to mutate state within an individual process (actor), but not for one process to tinker with the state of another process.”

“When I was about six years old I received the essential bodhichitta teaching from an old woman sitting in the sun. I was walking by her house one day feeling lonely, unloved and mad, kicking anything I could find. Laughing, she said to me, ‘Little girl, don’t you go letting life harden your heart.’

Right there, I received this pith instruction: we can let the circumstances of our lives harden us so that we become increasingly resentful and afraid, or we can let them soften us and make us kinder and more open to what scares us. We always have this choice.”

When my dad was my current age (and I was 20), I didn’t know it, but that would be the last time I’d see him until after lung cancer had ravaged his body. If I could have said, “Please quit trying to control my life, let me make my own mistakes, and I’ll let you know if I need any help” — and he would have agreed to that — we might have found a way to see each other again.

So, my recommendation is that if you have a dad, no matter how well you’re getting along, give him a hug. ;)

I thought it was great that you can donate any dollar amount you want to The Guardian to support professional journalism. I wrote the New York Times and Washington Post and said I don’t read their content enough to justify a subscription, and asked if I could either donate to them or use some form of micropayments, but they both wrote back to say they only offer (more expensive) subscriptions.

Update: Someone wrote on Twitter to note that these are for-profit organizations and therefore they can’t take donations. That’s not true, but even if they didn’t want to accept donations, they could offer micropayments or lower-cost subscriptions for a limited number of page views.