In this fast-paced video I show what the ZIO 2 library is in the fastest way I know how. I show the benefits of effects and effect systems, and specifically how ZIO is the new “Functional Programming, Simplified.”
Scala, Java, Unix, MacOS tutorials (page 1)
This page provides a comprehensive overview of error-handling strategies in ZIO 2. My hope is that you can use this decision tree to determine good/best approaches for handling errors in your ZIO effects. Each section includes a use case (question/answer), brief explanation, and ZIO 2 example.
As a brief note, I have ensured that the following examples compile, but I feel like I need to double-check some of my work.
“Proper meditation is so intense it doesn’t even allow thinking, ‘I am meditating.’”
~ Ramana Maharshi
I did a “gratitude” meditation exercise two nights ago, and it ended up going almost four hours. (Fortunately for me, at advanced levels you can trade some meditation time for sleep.)
The technique is to put your mind in the area of your heart and express things you’re thankful for, including this crazy body I have, all of you, and in the end, basically everything.
If it helps you can start by feeling love for one being — such as Zeus — and work out from there.
A soul that temporarily has a body
At some point it really hits you that I’m some soul that’s pushing this vehicle that was named “Alvin” around, and YOU are also some other individual soul. So when YOU don’t do what I want, that’s okay, because you’re another student here in Earth School. Basically, MY soul needs to give YOUR soul that freedom to work your stuff out.
I noticed that the ZIO 2 ZIO.fromOption method returns Option[Nothing] as its error type, so I asked my friend Claude about it, and got the following response, which I have cleaned up a little.
A woman in a dream this morning was quite distraught and spoke only Spanish. I tried communicating by speaking very slowly (“Why .. are .. you .. here?”, “You're .. in .. the .. wrong .. dream”), but that didn’t help at all.
(A dream from September 22, 2013)
Scala FAQ: What is the Nothing type in Scala, and how do I use it?
Solution
In Scala, the Nothing type is called a bottom type, which means it is a sub-type of every other type in the Scala type system. It is also specifically a data type that has no instances.
In practical use, Nothing is used to indicate that a computation or function will never produce a result normally, either because it throws an exception, enters an infinite loop, or encounters some other abnormal termination.
Visually, this is what the Nothing type looks like in the Scala type hierarchy (image courtesy of this scala-lang.org page):

Scala: Common uses of Nothing
Some common use cases of Nothing in Scala include:
If you’ve ever seen the “Maine Cabin Masters” tv show, you may have seen the black flag that they fly on their cabins while they’re working on them. If you ever wondered about their black flag, here’s what I can tell you from this deleted scene video:
- In the video, which was posted on March 19, 2020, Ryan states that the flag is new.
- The flag signifies the Maine Cabin Masters “are here” and “we’re kicking butt on this project, and it’s going to be the best this camp will ever be.”
- It is the Maine Cabin Masters “skull and crossbones.”
- The image is a Chase Morrill design.
If you haven’t seen them yet, here’s a link to Alvin Alexander’s free Scala 3 and Functional Programming video courses. The functional programming course shown in this image was just released today, September, 8, 2024.
As I work more with ZIO 2, I also find myself thinking a lot about the ZIO 2 mental model, by which I partially mean “a way of thinking about your code” and also “ZIO 2 best practices.”
Here are my initial notes. Also, I hope that most of this code is mine, but several snippets are from other sources that I don’t remember, including the official ZIO 2 docs.
Functional Programming, Simplified — currently 5-star rated on Gumroad.com, 4.5-star rated on Amazon, and one of the all-time best-selling books on functional programming — is currently on sale in three formats (prices shown in USD):
|
PDF Format |
Paperback Book |
Kindle eBook |
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.)
And if you like the movie The Ten Commandments, I also wrote this blog post about The Ten Commandments and the 2024 Presidential Election.
“Always kiss me goodnight. Always kiss me goodmorning, too.”
~ as seen in a house in Florida
Dear Fellow Christian Voters,
It’s now September, 2024, and I’ve spent a lot of time with a man who is 85+ years old, and is a true devout Christian. At church he ushers people to their seats, and volunteers at all the church events, volunteering two days a week at the local food pantry. He’s come to know that he’s going to pass away in the next 10 or 20 years, and his number one concern in life is that he doesn’t want to go to Hell.
Now you may not be in your 80s or thinking about death, but I can tell you that he is, and he doesn’t want to spend eternity in Hell.
I have another relative who is a devout Christian, and she watches Fox News a lot, and her number one concern is that The Rapture is coming, and she doesn’t want to be left behind.
Being a True Christian, and the 2024 Presidential Election
What does this have to do with the 2024 Presidential Election?
As a brief note today, here is a short list of spiritual teachers I am aware of who have expressed the idea “I am not the body.” Sri Nisargadatta Maharaj made this the most obvious to me by writing a book titled, “I Am Not The Body,” but when you think about it, many spiritual teachers have said the exact same thing in different ways.
One thing you learn when you really become dedicated to mindfulness practice is that every moment you aren’t being mindful, you’re feeding your ego. Any thought about the past or future solidifies this ego-cage you have built up in your mind.
This page contains a list of my favorite mindfulness quotes. Most of these are short, concise quotes that help bring me back to the present moment, and work well with my “Just Be” mobile app.
Update: I have replaced my Just Be application — which was written for Android only — with a new application I call Back To Now, which runs on both Android and iOS.
Background: Just Be
Just Be was a mobile mindfulness app that I created for Android users. This is what the reminders/notifications look like when you receive them on an Android phone or tablet:

“The whole essence of Zen consists in walking along the razor’s edge of Now.”
I know that I may never get to any “final” stages of enlightenment, but IMHO and as near as I can tell from my current meditation practice level, the last steps leading up to enlightenment/awakening/liberation are:
If you’re interested in mindfulness and meditation, this scene from “Star Wars: Rogue One” demonstrates mantra meditation at its best: Belief, total commitment and single-mindedness, and practice in action.
A few related quotes:
“You must concentrate upon and consecrate yourself wholly to each day, as though a fire were raging in your hair.”
~ Zen Master Taisen Deshimaru


