Methods on the Scala collections classes, organized by category alvin November 18, 2017 - 4:10pm

When I wrote the Scala Cookbook, I gave each recipe and then each chapter my full attention. I thought that if I wrote each recipe as well as possible, and included important recipes in each chapter, well, I wanted each chapter to be worth the price of the entire book. That was my goal.

As a result of this effort -- and perhaps to the chagrin of my editor -- the Scala collections chapters ended up being 130 pages in length.

Slides from “Scala 2.13 and Beyond” alvin November 18, 2017 - 9:51am

Here’s a link to some slides from a Lightbend presentation titled, Scala 2.13 & Beyond.

Plain Functional Programming talk by Martin Odersky alvin November 10, 2017 - 9:10am

I haven’t had time to watch it yet, but here’s Martin Odersky’s Devoxx talk that’s titled, Plain Functional Programming.

Looking at some differences between Scalaz Task and Scala Future alvin October 29, 2017 - 6:04pm
Table of Contents1 - The Scala Future example2 - The Scalaz Task example3 - What happens when you call the Future twice?4 - What happens when you call the Task twice?5 - Is one approach correct?6 - Source code

Some time ago I was searching for something and came across this Reddit thread about this tweet from Timothy Perrett, who leads Scala teams at Verizon:

“The fact that #scala Future is not lazy just blows my mind. After years of using Scalaz Task, Future is now totally unusable.”

The last part of that tweet is a bit of hyperbole to me, as I’ve been using the Scala Future for a long time myself, and I’ve had no problems using it. That being said, the examples at the top of the Reddit page were interesting, so I decided to try to understand the differences.

jsoup worked well as a way to modifying HTML content using Scala alvin October 29, 2017 - 4:22pm

I’ve used HtmlCleaner many times before to read/parse HTML content, but jsoup worked well today as a way to modify HTML content using Scala.

How to write a Scala shell script that reads input from STDIN alvin October 29, 2017 - 1:52pm

As a quick note, if you need an example of how to write a Scala shell script that reads from STDIN (standard input) and writes to STDOUT (standard output), this code shows a solution:

exec scala -savecompiled "$0" "$@"


var line = ""
while ({line = StdIn.readLine(); line != null}) {
Scalafmt, a source code formatter for Scala alvin October 28, 2017 - 2:15pm

Scalafmt is a source code formatter for Scala.

A By The Bay interview with Tim Perrett alvin October 25, 2017 - 12:03pm

By The Bay has a very interesting interview with Tim Perrett, whose resume includes leading Scala teams at Verizon, and being a founding board member of the Scala Center.

A few good quotes from him at the beginning of the article: “Unlike many people in our industry, I left school at a young age and did not attend university. My first job was actually working in a factory. My modus operandi is that hard work and dedication can overcome any problem ... humility is something that enables one to be open to the ideas of others. To conclude: Listen, be humble, and roll up your sleeves.”

Functional Programming, Simplified (Kindle sale) alvin October 22, 2017 - 8:46pm

Functional Programming, Simplified” is currently $15 on Amazon. Get it while you can, the price goes back up to $30 Monday night (October 23, 2017).

Functional Programming, Simplified alvin October 21, 2017 - 11:37pm

Dateline October 20, 2017: I’ve renamed my book about Scala and functional programming. The original name was, “Learning Functional Programming in Scala,” but I don’t think that sets the tone of the book quite right, so I renamed it to “Functional Programming, Simplified (Scala edition).”

You can preview and buy the book in two places:

Here’s the new “Rampaging Lambda” book cover:

Functional Programming, Simplified book cover