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

I’ve read before that practicing attitudes like gratitude and humility can help re-program the brain in a positive way. Conversely, you (or your toxic parents) can also train the neural network in your brain to tend towards negative thoughts. I thought of this when I saw this article by Annie Wood titled, How complaining rewires your brain for negativity (and how to break the habit).

Being interested in baseball, Tom Seaver, and Alaska, this article about Tom Seaver’s first game in Fairbanks, Alaska is interesting.

I’m sitting here writing a book on how to write better software using functional programming techniques, then I go to the Boulder Community Hospital website to pay my bill (powered by chase.com), and they don’t tell you how much you owe, you’re just supposed to type in how much you think you owe. It’s like calling Kramer on Seinfeld to get a list of movies: “Why don’t you just tell me where you want to see the movie?” *crazy*

BCH.org: How much do you think you owe?

If for some reason you want a Covfefe coffee mug, here you go.

Covfefe coffee mug

putStrLn doesn’t print to standard out, it returns a value — of type IO () — which describes how to print to standard out, but stops short of actually doing it.”

From the article, An IO Monad for Cats.

As a quick note, if you’re interested in using the IO monad described in this IO Monad for Cats article, here’s the source code for a complete Scala App based on that article:

The people at underscore.io have made their books on Scala and functional programming free (or “donationware,” if you prefer). I’ve found the Advanced Scala with Cats book to be particularly good, and well worth a donation.

(Full disclosure: I didn’t pay for the Advanced Scala book when I first downloaded it, then went back and tried to pay for it, but the Gumroad website wouldn’t let me do that.)

underscore.io books

After the 0.1.2 release of Learning Functional Programming in Scala, it occurs to me that I need to be more explicit about my goals for the book. Some people seem to think that I’m trying to “sell” functional programming. That’s not the case at all. I’m just trying to be a reporter and explain what I’ve learned about FP after reading dozens (hundreds?!) of articles and many books on FP, learning Haskell, trying to apply these techniques to my own code, etc. I’ll explain this further in the next release of the book.

I haven’t watched all of this video yet, but it’s about how to build Scala projects with a tool named CBT.

"Enlightenment of the wave". From the book, Zen Speaks, Shouts of Nothingness. The book is filled with wonderful cartoons like this.

Zen Speaks: Enlightenment of the wave

“The mind can proceed only so far upon what it knows and can prove. There comes a point where the mind takes a higher plane of knowledge, but can never prove how it got there. All great discoveries have involved such a leap.”

As a quick note, if you want to embed a Scala source code example in your Scaladoc comments, just put the source code block in between {{{ and }}} characters in your comments, as shown in this example:

How to format source code blocks in Scaladoc comments

“Meditation is to bring the complex consciousness to simplicity and innocence without pride and arrogance.”

B.K.S. Itengar, The Tree of Yoga

Had another dream this morning that I was running on all fours. Rather than ask myself, “Why in the world am I doing this?”, I now just accept that I’m a dog (or a cat, or some other animal) in the dream. That helps me go along with whatever is happening in the dream, rather than fight it and wake up.

(Notes from a dream on June 28, 2016)

In my younger days this wasn't much of a problem. Unfortunately gravity seems to have increased significantly since the 1980s.

Stuck basketball

Tin Man by Miranda Lambert is a bit of a downer, but it’s the prettiest song I’ve heard in a while.

“A thousand days of training to develop, ten thousand days of training to polish.”

“It takes a thousand days to forge the spirit, and ten thousand days to polish it.”

~ These are two variations of a quote I saw today by Miyamoto Musashi

Intellij IDEA has a reall nice help-tip hover tool that helps to explain some of Scala’s advanced language features. In this case the code Monad[M[_]] is a higher-kinded type, which I hope to explain more in my new book.

Scala advanced language features

“Everyday life is like programming, I guess. If you love something, you can put beauty into it.”

~ Donald Knuth

Back in 2011, I lived in Palmer, Alaska. I drove about an hour down to Anchorage to visit a friend, then drove back to Palmer just after 1:30am. During the drive back I didn’t need my headlights on to see, but I kept them on so other cars could see me more easily. It was like driving during a very long “dawn” or “dusk” period.

Let the Sun shine (Anchorage, Alaska)