Next version of Learning Functional Programming in Scala alvin August 16, 2017 - 10:25am

I get to have another operation (surgery) next week, but I still hope to have the next version of my book on Scala and functional programming available by the end of the month.

SBT 1.0 is now available alvin August 11, 2017 - 8:01am

SBT 1.0.0 is now available. See this Lightbend page for more details.

Some people in Colorado crack me up

Some people in Colorado crack me up. A recent conversation:

Me: Yada yada yada, I have an autoimmune disease.

Other: You should try marijuana.

165 Pink Floyd songs, ranked worst to best alvin August 8, 2017 - 9:28am

Bill Wyman, bass guitarist for the Rolling Stones, ranks all 165 Pink Floyd songs from worst to best.

Why does time exist? (A TED Radio Hour talk) alvin August 6, 2017 - 11:17am

On my list to listen to: A TED Radio Hour discussion, Why Does Time Exist?

There could have been no two hearts so open (Persuasion) alvin August 5, 2017 - 9:43pm

“There could have been no two hearts so open, no tastes so similar, no feelings so in unison.”

A Scala method to run any block of code slowly alvin August 5, 2017 - 5:36pm

The book, Advanced Scala with Cats, has a nice little function you can use to run a block of code “slowly”:

def slowly[A](body: => A) = try body finally Thread.sleep(100)

I’d never seen a try/finally block written like that, so it was something new for the brain.

In the book they run a factorial method slowly, like this:

slowly(factorial(n - 1).map(_ * n))

FWIW, you can modify slowly to pass in the length of time to sleep, like this:

def slowly[A](body: => A, sleepTime: Long) = try body finally Thread.sleep(sleepTime)