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

A Microservices Bestseller!
Building
Microservices

Late January, 2026: Woo Woo Woo is a binaural beats app that I have created. It’s a simple, totally-private, binaural beats app for meditation, relaxation, focus, and sleep.

It’s now available here in the Apple App Store, and at some point I will also make it available for Android devices.

For more information, please see either of those links!

Woo Woo Woo: A binaural beats app

March, 2023: I decided to rename my book, Learn Functional Programming Without Fear to Learn Functional Programming The Fast Way! because (a) I think it’s more reflective of today’s world, and (b) it’s consistent with my other book, Learn Scala 3 The Fast Way!.

You can currently find the PDF version of Learn Functional Programming The Fast Way! at this Gumroad.com URL.

Learn Functional Programming The Fast Way! (new book cover)

People occasionally ask me, “What’s the easiest way to learn functional programming?” If you look at all of the books on the right side of this image, I can tell you that reading all of those books wasn’t an easy way to learn functional programming (FP):

IMHO there’s a much easier way to learn the FP basics: I’ve made almost 40% of my book, Functional Programming, Simplified, freely available.

The lessons in the free PDF you can find at that URL include:

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
$10 on Gumroad

PDF version of Functional Programming, Simplified

Paperback Book
$39.99 on Amazon

Print version of Functional Programming, Simplified

Kindle eBook
$9.99 on Amazon

Kindle version of Functional Programming, Simplified

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

PDF Format
$10 on Gumroad.com

Learn Functional Programming The Fast Way! (PDF Version)

Paperback
$30 on Amazon

Learn Functional Programming The Fast Way (Paperback)

Kindle
$10 on Amazon

Learn Functional Programming The Fast Way! (Kindle Edition)

I’ve been slowly working on a series of new Scala programming books, and today I’m proud to announce the first of these:

Learn Scala 3 The Fast Way! (book cover)

Starting today you can buy the PDF version of Learn Scala 3 The Fast Way! for just ten dollars — $10 (USD) — at this Gumroad.com URL.

As a brief note today, I just released the first version of a new, free book/booklet that I’ve titled Learning Recursion.

Learning Recursion: A free booklet by Alvin Alexander

Since I’ve written two functional programming (FP) books, I thought it might help to provide a comparison of them.

The short story is that both FP books have “limited technical jargon,” and as shown, The Little FP Book essentially has one purpose, which is to help Java/Kotlin/OOP developers learn functional programming as fast as possible, using a technique that I “discovered” over the last few years.

Conversely, The Big FP Book covers many topics in great detail.

If you’re interested in more details, here are links to the two books:

Functional programming books, comparison

Some of the computer programming books on the right side of this image are amazing, and I would never discourage anyone from reading the great ones.

But if you’re an object-oriented programming (OOP) developer who wants to start understanding functional programming (FP) over a weekend or a few nights of reading, that’s the goal of the new little book on the left: Learn Functional Programming The Fast Way. It takes you from Java/OOP to functional programming in the simplest possible step-by-step learning process.

FP for Java/Kotlin/OOP developers

I taught Java and OOP for many years, and have used other OOP languages like Kotlin, Python, and Flutter/Dart, so I understand both OOP and FP, and I think that helped to make this a simple book for learning FP.

I also wrote the FP book in the middle — Functional Programming, Simplified — and it’s about three times larger than the little book on the left. I based it on most of the FP books on the right, and it goes into many details that the book on the left doesn’t go into. It’s big, but it’s still easier than reading all the books on the right.

For OOP developers: The smallest, simplest functional programming book

From this article on how “Breath-based meditation shifts the brain into a deeply relaxed state”:

“We found that rhythmic breathing practice like Sudarshan Kriya Yoga allows an easier access to a deep state of meditation,” Tripathi told PsyPost. “EEG from participants were recorded before, during and after they were practicing the technique. EEG records brain activity which can be quantified into different rhythms like alpha, beta, theta, delta and gamma.”

“What we found was that the breathing activated the theta rhythms in the brain which allowed a practitioner to easily transition to a relaxed state with heightened theta-delta activity. This activity is somewhere between fully awake (alpha/beta dominant) to fully asleep (slow waves and delta dominant), suggesting that the practitioner is in a relaxed yet aware state which traditional texts of meditation have referred to as Turiya (fourth state of consciousness, the others being sleeping, awake and dreaming).”

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.

(Note: I saw the term ego-cage in a book, but I don’t remember which one.)

Another good interview question of late was something like, “Who are some of your heroes, or people who have motivated you?”

I forgot to mention Bernie Glassman, from whom I learned that you don’t have to go off and meditate in the mountains to become enlightened.

You can learn more about him here on Wikipedia if you’re interested. And here’s a link to The Dude and the Zen Master on Amazon.

Interview question: Who are your heroes, or people who have motivated you (Bernie Glassman)

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 at some point I need to take the time to double-check my work.

I haven’t interviewed for a job in many years, and yesterday I had my first interview in 14 years. I thought I could just pick up where I left off many years ago without any practice, but boy was I wrong.

I *did* want to talk about my health saga from 2012-2019 because it’s an important part of who I am today, but I talked about it too much. All I wanted to say was that (a) I got very sick and went unconscious many times before Doctor #26 found that I was born with a rare blood disease, (b) everything is fine now, and (c) the important part of that saga is that I gained much more empathy for people going through things, and I also learned that I wanted to be more of service to other people. But I blabbed on about the health stuff for too long, and I regret that. If they offer me a second interview after that, they will be very kind, indeed.

(I also could have added something useful like, “If you’re constantly itchy, have hives, or frequently get sick, feel free to ask me any questions you want later.”)

In my mind I thought that because I had written about this stuff many times before that I didn’t need to talk about it, but in retrospect I realized that it would have helped to talk about this stuff with other people before any interviews.

I also thought that I had conquered a lot of things with my ego, but this was another kick-in-the-butt reminder of where I really am.

“I slept and dreamt that life was joy. I awoke and saw that life was service. I acted and behold, service was joy.”

~ Rabindranath Tagore

My favorite garbage dumpster in Seward, Alaska: “Look for peace, look for love, look for good things, look for moose.”

A garbage dumpster in Seward, Alaska

AppleScript FAQ: Can you share some iTunes/Music AppleScript examples (example scripts)?

As I've been working a lot with macOS speech recognition software lately, AppleScript has once again become important in my life. I've been writing a lot of small AppleScript scripts — including AppleScript iTunes scripts — and I thought I'd share snippets of code from those iTunes scripts here for anyone else they might benefit.

2021 Update: Wherever it says “iTunes” below, substitute the word “Music”, as Apple has renamed the iTunes application to Music.


It was driving me crazy that the quality of the songs I was streaming from a website known as Bandcamp sounded better than the quality of the songs I was playing from my iTunes (now Music) collection. In my case, I recently bought a Marian Call CD named “Something Fierce”, and had imported the songs from that CD into iTunes. But the songs I streamed from Bandcamp sounded better than the songs I imported from the CD; how could this be?

I dug into the problem and found two simple fixes, both in iTunes. In this article I'll show you how to make those fixes to dramatically increase your iTunes sound/music quality.

I recently took an online “assessment” test with a company named SHL. In general it was good and interesting, but after thinking about it, one thing it really lacked was a concept of “context.”

For instance, one question was something like, “Are you comfortable talking to strangers?” Well, that depends on the context of the situation. In the context of being at a grocery store I generally have my earbuds in and leave strangers alone until I talk to the cashier, but in the context of work, I pretty much talk to everyone. Two different contexts, two totally different answers.

So as I’m answering the questions I keep asking myself, “What’s the context?” Unfortunately I didn’t share this at the end of the SHL test when they give you a little room to comment, so I thought I’d share that here in hopes someone there might see this.

A Microservices Bestseller!
Building
Microservices