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

Some day I might write a book called, Random Conversations with Strangers While Aimlessly Wandering Around, and it will include stories like this:

Many years ago I walked into a favorite bakery in Alaska. Nobody was there, no customers or employees, so I took a few minutes to look over the cookies and donuts to decide what I wanted.

Finally a young woman came out of the back room. I knew from previous donut/cookie runs that she was born in Ohio, moved here about five years ago, was nineteen years old, and would be twenty in a few months. As she brought out a tray of something new, she said, “Oh, I’m sorry, I didn’t hear you come in.”

I replied it was no problem, it gave me a chance to think about what I wanted. We chatted for another minute or two and then she looked around and said, “Can I be honest with you?”

Ram Dass FAQ: What is the best Ram Dass book to start with?

My answer: The best Ram Dass book to start with is ...

I wrote this in my earlier blog post, What Are The Best Books By Ram Dass, but I believe the best book you can start with is Polishing The Mirror.

I think this book is the best summary of all his work. It’s a relatively short book, it’s clearly written, and summarizes much of what you’ll read in his other books. I started reading this when I was in the hospital, and as bad as I was feeling at the time, it just blew me away. I like to underline and highlight text, and I felt like I could highlight most of the book.

Welcome! This page contains direct links to all of the videos in my 100% Free Video Training Courses. When I say “100% Free”, I mean that there are no ads and no paywalls — all of the videos below are completely free to watch.

My first three courses are listed here, and when I add more free video courses I’ll update this page.

As always I want to thank Ziverge for making this possible! This videos take a long time to create, and I wouldn’t have the time to create these without Ziverge being a sponsor. If you ever want to thank the people at Ziverge, be sure to give them a call when your programming team needs assistance on programming projects. They work with Scala, Rust, A.I., Python, and much more.

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
$15 on Gumroad.com

PDF version of Functional Programming, Simplified

Paperback Book
Now $29.99 on Amazon

Print version of Functional Programming, Simplified

Kindle eBook
$14.99 on Amazon

Kindle version of Functional Programming, Simplified

A funny moment from the tv series Life: “Did he ever have a head injury?”

Life tv show: Did he ever have a head injury?

Every spring I think about moving back to Alaska. This is a photo of the cabin I lived in in Talkeetna, Alaska back in the day.

The cabin in Talkeetna, Alaska

If you’ve never seen the movie Starbuck, it’s very good, and often very funny. This is one scene where a pregnant women is trying to come to grip with various feelings she is dealing with.

The park scene in the movie Starbuck

I just saw this drawing on the Learn You a Haskell website, and I wish I had done something visual like it for the Scala Cookbook. It does a nice job of showing the head, tail, init, and last functions (methods).

Scala sequences: head, tail, init, last (visual, image)

Scala/Java/Kotlin String FAQ: How do I replace left and right brackets — the [ and ] characters — in a String when using methods like replaceFirst and replaceAll?

Solution

If you’re using Scala, Java, Kotlin, or other JVM languages, and need to replace left or right brackets in a String, I found the following solution, which seems to work well with String methods like replaceFirst and replaceAll.

My meditation tip of the day: If you really, really, really can’t take time out to meditate, the best thing you can do is pay ruthless attention to the present moment during your daily activities. And the best way to do that is through mantras or noting practices.

“You can meditate while talking to someone, while washing the dishes, while driving. As your experience grows, you eventually come to a point where you are so present that there is a kind of merging of inside and outside. When that happens, ‘focus’ becomes more than an extremely interesting and pleasant experience; it becomes a transformative experience.”

“Eventually a delicious figure-ground reversal takes place. In the beginning, meditation is something that happens within your day. Eventually, the day becomes something that happens within your meditation.”

~ From “The Science of Enlightenment: How Meditation Works

As a quick note, if you have a problem using Alfred snippets on Mac/macOS, where (a) your snippets are being displayed to you properly, but (b) aren’t pasting properly, see this url on alfredapp.com for the solution.

After trying to manually remove and then re-add permissions — as suggested on the Alfred forum — I found this page and the tccutil command. Following their instructions, I first shut down Alfred and then ran this command at the command line:

> tccutil reset All com.runningwithcrayons.Alfred
Successfully reset All approval status for com.runningwithcrayons.Alfred

I then restarted Alfred, and all of the “snippets” functionality began working again, including showing my snippets when I press my shortcut key combination, and then expanding and pasting in my snippets.

I was watching a Season 4 episode of Maine Cabin Masters and heard an interesting saying that Ryan has about Sunday and Monday:

“Don’t let your Monday ruin your Sunday.”

Initially Ashley and Jedi were talking about this, and then I think Ryan talked about it as well. They started the conversation when they found a sign in someone’s cabin, and Ashley noted that Ryan says that all the time.

The basic idea is that you know you have to go to work on Monday, but don’t let that ruin your Sunday, meaning that Sunday is still your day off, and you should enjoy it, rather than worrying about Monday all Sunday like many people do.

They also mention this saying in this Facebook post.

As a brief note today, I have been reading the Bhagavad Gita (translated by Jack Hawley) lately, and he shares this good line that relates to desire, attachment, and even addiction:

“Realizing the truth of your True Self is your principal weapon for eradicating desire.”

My short interpretation of that is that our True Self is not our physical body, but something else that you might call awareness, consciousness, the subtle body, the soul, or the Atma, AND, it is possible through yoga, mindfulness, and meditation practice to get in touch with (feel/experience) your True Self. And then, once you realize who you are, your attachments to the physical world will go away.

I used to have a friend who was an addict, and I know she was always looking for anything that would help, so I hope this quote can be helpful for others.

This is a “cheat sheet” for the Scala 3 programming language. I initially wrote it for my book Learn Functional Programming The Fast Way, but I thought I’d share it here as well.

If you want to see many more details about Scala 3, see:

Here’s an old mug/tumbler from the Sundance Club in College Station, Texas, circa 1985 or so. If you happened to go to school at Texas A&M back then, you may recall the Sundance Club, which was in the Hilton Hotel.

Mug from the Sundance Club, in College Station, Texas

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.”
  • It’s a Chase Morrill design.

Spent the last few hours dreaming of living in a colony on the Moon. Every moment was a new experience – bad pay, canned food, watching a movie in a makeshift theater — which reminded me of the M*A*S*H movie and tv series — but also several different beings and cultures that I found fascinating. Then I suddenly had the idea for a new book that I wanted to call, “Moon’s First Murder.” I started scribbling down some notes, but knew I didn’t know enough about the cultures, so I recruited a friend to help me with that.

~ a lucid dream note from April 2, 2014