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

Dateline May 30, 2023: Today I just released a new version of my book, Functional Programming, Simplified. This is Version 0.08, and it adds “App 4”, where we get into traits, inheritance, generics, variance, bounds, modules, Nothing, and more.

May 30, 2023: New release of Functional Programming, Simplified

The realized yogi continues to function and act in the world, but in a way that is free. She is free from the desires of motivation and free from the desires of the rewards of action.

The yogi is utterly disinterested but paradoxically full of the engagement of compassion. She is in the world but not of it. The yogi is beyond cause and effect, action and reaction.

Later we shall see the role that Time plays in this — how there is freedom because the Illusion of Time no longer exists to bind us to the past and future.

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

“The most beautiful people we have known are those who have known defeat, known suffering, known struggle, known loss, and have found their way out of the depths. These persons have an appreciation, a sensitivity, and an understanding of life that fills them with compassion, gentleness, and a deep loving concern. Beautiful people do not just happen.”

~  Elisabeth Kubler-Ross

In my experience, some “judgy” people will make up their own opinion about you — about what you should do or shouldn’t do — when they don’t know all the facts.

(I use the word judgy, because if you’re a Christian, Jesus was very clear on this point: “Judge not, that ye not be judged.”)

To wit, sometimes you just have to let people be wrong about you.

From this tweet by TinyBuddha.

Sometimes you just have to let people be wrong about you

This is a recipe from the Scala Cookbook (2nd Edition). This recipe is titled, Working with Parameterized Traits in Scala.


As you become more advanced in working with Scala types, you want to write a trait whose methods can be applied to generic types, or limited to other specific types.


Depending on your needs you can use type parameters or type members with traits. This example shows what a generic trait type parameter looks like:

If only ... I had a little bit more time
If only ... I had a little bit more time with you

I fell down, down, down
Into this dark and lonely hole
There was no one there to care about me anymore
And I needed a way to climb and grab a hold of the edge
You were sitting there holding a rope


And maybe someday I’ll see you again
We’ll float up in the clouds and we’ll never see the end

~ from Clouds (Up Up Up) by Zach Sobiech

A poem from the tv series Monk:

“Hold me, Adrian,
my darling husband.

True love’s touch is so rare a gift.
How much more precious is your caress
who loves so deeply,
yet fears the warmth,
of hand on hand.

Still your love is given free,
only to me,
only to me.”

~ Trudy Monk

Possibly my favorite part of the movie Spanglish is when Cloris Leachman’s character says, “I love you. I love everyone. That’s what’s killing me.”

From a Zen/Buddhist perspective, that’s the emotion of a Bodhisattva (an enlightened being who chooses to stay here out of compassion, to save all beings). You love everyone, and there are consequences of that.

I started watching Dawson’s Creek recently because I was curious what Joshua Jackson was like before Fringe, and I have to say — I know their conversations are intentionally verbose — but even in the short talks between Dawson and his parents, my relationship with my parents was nothing like that. We never talked about things because my mom was very sick and my dad was very domineering and abusive. So I watch this show and wonder, is that what parental relationships are really like in a healthy household?

I think I managed to alienate all of my “Facebook friends” by writing about things like Zen, meditation, mindfulness, yoga, and all the experiences that come from studying and practicing these things. And I also understand that alienation, because there are many “spiritual” things I’m not interested in from certain other spiritual/religious perspectives. (I’m more open than that sounds, but I have a hard time when people don’t practice what they preach, or cherry-pick a few things Jesus taught while ignoring the teachings they don‘t like.)

That being said, the things that Shinzen Young — a modern day meditation master in the U.S. — speaks about here and in this two-minute video echo everything I’ve discovered on my own and wrote about. So while, yes, I feel bad about oversharing about this sort of thing with people who don’t have similar interests on my now-defunct Facebook account, well, at least I was right. :)

Dateline April 22, 2023: Learn Functional Programming The Fast Way! is still the #1 New Release in Amazon’s Functional Programming category.

#1 functional programming book, April 22, 2023

I recently watched the movie, The Ten Commandments, and when I saw Sephora, I thought, “She looks familiar.”

It turns out she’s played by Yvonne De Carlo. She’s the actress who’s portrayed on my Learn Scala 3 book cover, which is based on the 1950 movie, Buccaneer’s Girl, which she starred in. (Until this, I thought I only knew her as Lily Munster on The Munsters.)

Yvonne De Carlo in The Ten Commandments (and more)

If you ever need a macOS script to convert many HEIC images to JPG or PNG format, I just wrote and used the following shell script, which uses the ImageMagick library, and I can confirm that it works.

As a word of warning before using this code, make sure you back up your images before running the script, because it will operate on ALL HEIC images in the directory it is run:

I’m glad to report that several weeks after its release, Learn Functional Programming The Fast Way! is still a #1 New Release in several different categories on Amazon, including Functional Programming, Computer Programming, and Data Modeling & Design.

Best new functional programming book

I’ve always used some sort of Kanban technique in my brain, long before I knew the formal meaning of a Kanban board or Kanban process. But in the last few years I started using a whiteboard as my Kanban board, and I really like it. It makes me more organized and productive, and I feel like the productive part is because it makes work and progress visible. In my entire computer programming career I have always liked the term, “make work visible,” and Kanban and Scrum are the epitome of that.

My Kanban board

Rocky Balboa, talking to his son:

“And when things got hard, you started looking for something to blame, like a big shadow. Let me tell you something you already know. The world ain’t all sunshine and rainbows. It’s a very mean and nasty place and I don’t care how tough you are, it will beat you to your knees and keep you there permanently if you let it. You, me, or nobody is gonna hit as hard as life. But it ain’t about how hard you hit. It’s about how hard you can get hit and keep moving forward. How much you can take and keep moving forward. That’s how winning is done.”

I enjoyed this quote from Rocky Balboa the first time I saw the movie, and I appreciate it even more now after getting my a** kicked by this f-ing blood disease, but still grinding along every day.

It's about how hard you can get hit and keep moving forward

I’m pleased to report that Learn Functional Programming The Fast Way! was recently rated as a #1 best-selling computer programming and functional programming book. You can’t ask for much more than being a best-selling book in the entire computer programming category. :)

Best-selling computer programming and functional programming book

You can now download a large, free preview of my new book, Learn Functional Programming The Fast Way!. Just follow that link and go to the Free Preview section. The book is 250 pages in length, and the free preview is 128 pages long, so it really is a large preview, and it’s FREE! :)

Learn Functional Programming The Fast Way! (free preview)

LATE MARCH, 2023: You can now download a large, free preview of the book. See the “Free Preview” section below.

MARCH, 2023: This book was previously named, Learn Functional Programming Without Fear, but I have renamed it to Learn Functional Programming The Fast Way!. I think this name is more reflective of the ZIO and Cats Effect libraries being easier to learn than ever before (without having to know category theory), and the name is also consistent with my other book, Learn Scala 3 The Fast Way!.

FEB., 2023: Learn Functional Programming Without Fear is now one of my best-selling books on (see the link below).

NOV., 2022: My new book, Learn Functional Programming Without Fear, is currently an Amazon Java and functional programming #1 new release. The book is now available in three formats:

PDF Format
$10 (USD) on

Learn Functional Programming The Fast Way! (PDF Version)

$30 on Amazon

Learn Functional Programming The Fast Way (Paperback)

$10 on Amazon

Learn Functional Programming The Fast Way! (Kindle Edition)

If you’re interested in this sort of thing, this is the full paperback cover of my new book, Learn Functional Programming The Fast Way!, as seen in Amazon’s previewer.

Learn Functional Programming The Fast Way!, full paperback cover