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

Meditation: If you’re not putting 100% of your being into it, you’re wasting your time.

~ a note to self

January 8, 2018: I just added lessons on SBT, ScalaTest, and a brief introduction to FP to the “Hello, Scala” website.

I had trouble getting to sleep last night, so instead of counting sheep I decided to count how many times doctors have performed invasive procedures on me. I counted 22 invasive procedures, including six operations. I’ve also had at least four MRIs and nine CT scans. I was thinking of this because I have at least two more procedures coming up in the first quarter of 2018.

“Human beings don’t want to be controlled by machines. And we are increasingly being controlled by machines ... This is likely to be the narrative of the next thirty years.”

This quote from Fred Wilson’s What happened in 2017 article makes me think of Apple’s recent dumb software design decisions as much as it makes me think of algorithms that control my news feeds. As just one example, Apple’s decision to make the “turn off bluetooth” button mean “turn off bluetooth ... well, just until tomorrow” makes me want to switch to Samsung. So, yeah, if I don’t want to be controlled by Apple’s poor design decisions, I sure don’t want to be controlled by robots.

Ben Evans has an interesting article on The Amazon machine. In an unrelated note (except that it came in the same email), here’s an NPR article about What to do if you come across a frozen iguana.

With a little luck, I hope to release another 5-10 lessons on my Hello, Scala website tomorrow evening (January 8, 2018).

fivethirtyeight.com offers a take on whether mindfulness meditation is helpful. The image shown comes from a journal named JAMA Internal Medicine.

Mindfulness meditation benefits

There’s a scene in the movie, The Family Man, where Nicolas Cage is sitting in a chair and trying to stay awake, because he knows that when he falls asleep his “glimpse” will be over.

The moments just before passing out are like that. Assuming that you’re not panicking, you’re vibrantly aware of everything around you — colors, smells, etc., because you don’t know if you’re just passing out or this is Game Over.

The end of a lucid dream can also be like that. You can be in the dream, know that you’re dreaming, and then know that you’re starting to wake up. You don’t want to leave, but you don’t have a choice, so you pay great attention to the environment because you know that you may never see it again.

To the best of my knowledge, all of those are also the correct mental state for Zen and mindfulness meditation. As Shunryu Suzuki says, “The true practice of meditation is to sit as if you are drinking water when you are thirsty.”

(Namaste)

According to ARK Invest, the cost of industrial robots will drop 65% by 2025. As they write, “Combined with advances in machine learning and computer vision, this drop in costs should cause an inflection point in the demand for robots as they infiltrate new industries with more provocative use cases.” (Image from the ARK Invest website.)

Industrial robot costs to drop 65%

“You’re gonna catch a cold from the ice inside your soul.”

“Those that invest the most are the last to surrender.”

~ said by many people, most recently Rich Gannon

Can ten minutes of mindfulness meditation make you more creative and feel less negative, restless, nervous, and irritated? The Harvard Business Review says yes it can.

Can mindfulness meditation make you more creative?

As a quick note today, if you’re ever writing a Unix/Linux shell script and need to get the filename from a complete (canonical) directory/file path, you can use the Linux basename command like this:

$ basename /foo/bar/baz/foo.txt
foo.txt

A high school student won $250,000 for her explanation of relativity, which she titled, Relativity & The Equivalence of Reference Frames. sciencealert.com has the story, and her video.

If you’re interested in Functional Programming, Simplified, but can’t decide on whether to buy it or not, I just updated the free PDF preview of the book to help you with that decision. And it’s not just any free preview: it’s over 400 pages long.

Here’s a link to the free PDF preview of Functional Programming, Simplified.

Functional Programming, Simplified - free preview

So on page 51 of Apple’s iPhone Terms and Conditions it clearly states, “We may slow down your iPhone to increase the sales of new iPhones.”

(It may say that, who knows. Having just updated iOS, I wouldn’t mind if they get sued over the ridiculous length of that doc.)

If you’ve read any of my books (like the Scala Cookbook or Functional Programming, Simplified), and thought, “Hey, I can write a book,” I encourage you to do so. One book that has been helpful in my writing career is William Zinsser’s On Writing Well: The Classic Guide to Writing Nonfiction. If you’re seriously thinking about writing a book about programming or any other technical topic, it’s a good read.

I gave myself two gifts for Christmas: A set of new bathroom rugs, and a few guilt-free days to learn the LibGDX game framework so I can eventually rewrite my football game. (Usually I think, “You need to finish writing XYZ,” so “a few guilt-free days” means not having those thoughts, or having them but ignoring them.)