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

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

If you ever need a macOS Unix shell 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

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)

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

This weekend I just released the shiny new paperback version of Learn Functional Programming The Fast Way!. And for the first 48 hours — until roughly the end of March 28, 2023 — you can buy it for half-price, here on Amazon.com.

Learn Functional Programming The Fast Way! (paperback)

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)

I’m currently updating my best-selling book, Functional Programming, Simplified, to cover Scala 3 and other technologies like ZIO and Cats Effect, and when that’s done, this will be the landing page for that book.

Until then, you can find the PDF for the new book that I’m creating here:

And you can find the Scala 2 version of the book here:

I’ll update this page as I have more information.

As I continue my quest to learn about Ram Dass and Maya (illusion), I also had a very hard time finding any quotes about Maharaj-ji (Neem Karoli Baba) and Maya, but after sifting through about 1,000 pages of books I finally found this Maharaj-ji quote:

  • “All is God’s will, but Maya prevents you from knowing it’s all God’s will.”

If you’re interested in this, you can find this quote and a little bit more on page 326 of the book, Miracle of Love.

October, 2023 Update: I also just found the following quotes in an out-of-print book about Maharaj-ji:

  • “You see others trapped by maya (illusion).”
  • “This temple and whatever is seen by the human eye are illusion.”
  • “Delusion makes everything look real.”

In that first quote the “(illusion)” part was in the book, I didn’t add that.

If you’re interested in learning more about Ram Dass, see my post on The Best Ram Dass Books I Know.

I hope that my new book, Learn Functional Programming Without Fear, is the easiest and simplest way to learn functional programming (FP). I didn’t initially intend for it to be an FP book, but as I was writing about pure functions, immutable (algebraic) variables, immutable data structures, and functional error-handling, I realized that these were the first four essential stepping stones to help you transition from OOP to FP, and to Scala/FP libraries like ZIO and Cats Effect.

Initially I was planning to write a book titled something like “Thinking with Types” or “Solving Problems with Pure Functions,” but once I realized where it was going, I decided to create a new functional programming book that’s much shorted than my own, Functional Programming, Simplified book.

Some quotes from Sean Payton, new head coach of the Denver Broncos, that relate to business as well as football:

“Discipline, toughness, football makeup and character are going to be really important for who is a Denver Bronco. I use this story and it’s a compliment. When I got hired in New Orleans in 2006, we just had to look at New England if we really wanted to see what the standard was. If we were making pizzas and there’s a line around the block in front of their pizza parlor, then we might want to know what they’re putting in their crust or their sauce.”

Related to the Patriots and Bill Belichick: “We studied closely how important intelligence was along with communication and makeup. That served us well later. There is an element of discipline, and there is an element of toughness. Look, it’s not for everyone. It’s not for everyone, but that’s the approach we’ll take.”

“Long, uninterrupted, alert practice is the firm foundation for restraining the fluctuations of the consciousness.”

~ Patanjali (via Iyengar)

If you like my books and want to earn a little extra income, I just started using the Gumroad “affiliates” program. Just sign up with Gumroad, link to one or more books, then hopefully make some sales and earn a little extra money.

I’m starting with a 30% commission, so if you sell a $10 book like Learn Scala 3 The Fast Way! you’ll earn $3, and if you sell a $20 book like Functional Programming, Simplified: Updated for Scala 3, you’ll earn $6 (USD).

If you’re interested, start the process here on Gumroad.com. You’ll also want to read their help page for Affiliates.

Become an affiliate for Alvin Alexander’s books

When I was writing my new functional programming book — Learn Functional Programming Without Fear — a few alternate titles for the book were:

  • Learn Functional Programming the Fast Way!
  • The Fastest Way to Learn Functional Programming
  • From Object-Oriented Programming to Functional Programming
  • Helping Object-Oriented Programmers Learn Functional Programming
  • Functional Programming for Objected-Oriented Programmers

The fastest way for OOP developers to learn FP

That’s because I found out — almost by accident — that the fastest way for object-oriented programming (OOP) developers to learn functional programming (FP) goes like this:

Note: This tutorial is an excerpt from the Scala Cookbook, 2nd Edition.

As you can tell from one look at the Scaladoc for the collections classes, Scala has a powerful type system. However, unless you’re the creator of a library, you can go a long way in Scala without having to go too far down into the depths of Scala types. But once you start creating libraries for other users, you will need to learn them. This chapter provides recipes for the most common type-related problems you’ll encounter.

Scala’s type system uses a set of symbols to express different generic type concepts, including the concepts of bounds, variance, and constraints.

If you’re looking for a unique gift for yourself or the Scala computer programmer in your life, I just created these coffee mug designs here on my Patreon account. There are two different designs, one with four book covers and another with three book covers, and both of them completely wrap around the mug.

Supporting my Patreon account helps to keep me writing and teaching about Scala, so I’m trying to find new and unique ways to thank my supporters. If you like coffee, tea, or any other beverage in a mug, I hope you’ll like these new designs.

Alvin Alexander book covers on a coffee mug

October, 2022: I just released my new book, Learn Functional Programming Without Fear, and my aim is to make it a terrific functional programming (FP) book for all OOP developers, especially Java and Kotlin programmers.

As a personal statement, I have no interest in pushing FP on anyone, but if you’re an OOP developer who is interested in FP, I hope this book is helpful. If you have some experience programming in Java, Kotlin, and OOP, I believe you’ll be able to read the whole book over a weekend, or in several nights during a week.

Update: It’s now December, 2022, and the book is still a “#1 New Release” on Amazon!

Why Java and Kotlin?

Why Java and Kotlin?:

  • For both of them, it’s because they’re JVM-based languages (or at least they were initially).
  • For Java developers, it’s because Java has incorporated several aspects of Scala over the last 12 years (including features like lambdas and immutable collections classes)
  • And for Kotlin developers, it’s because Kotlin and Scala are so similar. (My understanding is that Martin Odersky even consulted on the creation of Kotlin.) I’ve seen people say that if you know Scala, you can learn Kotlin in a week, and vice-versa.

FP for Java, Kotlin, and OOP developers

Best FP book for OOP, Java, and Kotlin developers