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

We walked the narrow path,
Beneath the smoking skies.
Sometimes you can barely tell the difference
Between darkness and light.
Do we have faith
In what we believe?
The truest test is when we cannot,
When we cannot see.

~ Lyrics from a pretty (but sad) song named It Can’t Rain All The Time, by Jane Siberry, which I first heard in the movie, The Crow.

This is a small version of a “painting” I’ve been working on. It’s from a photo I took when I was staying at the Jenny Lane Cottage(s) in Homer, Alaska. I started with the photo, and have been working on it in Gimp until I finally came up with this image, which hopefully looks a little bit like an oil painting. I’ll be including the full size “painting” in a new app that I’m working on.

While converting a photo to a painting in Gimp is usually fairly easy, it took a lot of work to make sure the bench in this photo/painting came out the way I wanted it to. Even just a few months ago I wouldn’t have been able to create this the way it is. (For that matter I couldn’t have made the mountains in the background look the way they look only two weeks ago.)

Jenny Lane cottage painting, Homer, Alaska

One thing that’s changed for me in the last year is that I’ve become a little less interested in what spiritual leaders have to say, and more interested in what spiritual laymen have to say. Don’t get me wrong, leaders are great in many ways, but they don’t have bills to pay, and don’t have spouses or children. I’m far more interested in what a spiritual person has to say when they’re in the midst of struggling to pay their bills, and they have jobs, spouses, children, and neighbors.

I was reminded of this recently when I saw a headline about Charlie Munger giving advice on how to be happy. I’ve read a lot of Charlie Munger quotes and he seems like a very nice person, but he’s been a billionaire for decades, and that skews your thinking. Based on my own experience, when you have a lot of money and you don’t have to worry about your health, paying your bills, noisy neighbors, or family problems, life is easy, so your advice is tainted. These days I’ll take “advice on happiness” from someone who is truly happy while living in the midst of the muck. In retrospect, this feeling is one thing that drew me to Viktor Frankl’s Man’s Search for Meaning when I was still a teenager.

There was a Drupal 8 module security update today for the Metatag module, and for some reason I couldn’t get Composer commands like these to work:

composer update drupal/metatag --with-dependencies
composer require 'drupal/metatag:^1.8'
composer require 'drupal/metatag:~1.8'

Paraphrasing someone tonight: “I worked on cool projects X, Y, Z with cool new technologies A, B, and C. They all failed. Nobody used them. The only app customers still use was written in lowly old PHP. And the customers love it.”

I took that as, if you build the wrong application, no cool new tech will save it.

A funny thing about writing books, or at least writing books with O’Reilly in 2013, is that I never received a final copy of the Scala Cookbook in PDF format. Fortunately I have the original Word docs, which is what they used at the time, so I carry those around on my laptop.

I’ve used Jenkins before, but hadn’t used it in a while, so when I got it running with Scala, SBT, ScalaTest, and Git, I made some notes about how to configure it. You can get Jenkins going with Docker, but I just got Jenkins running by starting its WAR file like this:

java -jar jenkins.war

Jenkins with Scala, SBT, ScalaTest, and Git

My notes on getting everything up and running are a little cryptic, but if you have a little experience with Jenkins I hope they’ll make sense. Here they are:

Carlos Castaneda meets Denali: “Does this path have a heart?”

For me, the path that led me to Alaska had a heart. For others, that path may have no heart, but another path does.

Carlos Castaneda meets Denali: 'Does this path have a heart?'

I bought my first copy of Agile Software Development with Scrum, by Schwarber and Beedle back around 2002, I think. I was just thumbing through it last night when I saw that they use Function Points as a metric to demonstrate the velocity that agile software teams achieve, and more specifically use it to show that some teams develop software much faster using Scrum.

I didn’t know about Function Point Analysis back in 2002 — I didn’t become a Certified Function Point Specialist until about two years later — so I probably just skimmed over that line then, but when I saw it last night I thought it was cool that they used function points as a metric for software team development speed.

A few times during the past year I got tired of trying to remember the Unix/Linux sed syntax while wanting to make edits to many files, so this weekend I wrote a little sed-like Scala class.

I think I’ve discovered the secret of life: you just hang around until you get used to it.

~ Charles M. Schulz

“Scope doesn’t creep; understanding grows.”

From Jeff Patton in User Story Mapping (something I tried to explain to people many years ago)

Introduction: I first wrote this article about automated GUI testing many years ago, but I find that it still holds today.

I just wrote most of the following note on the Apple Mac Java-dev mailing list, and I'd like to share it here as well, because I think it captures my thoughts on the benefits of automated GUI testing and GUI testing software.

I ran automated GUI tests part-time (4-6 hours per week) on a project with 8-12 developers, and saw some good benefits. True, in the 80/20 rule, 80% of the problems were due to UI changes and communication, like “We forgot to tell you we split the Name field into First Name and Last Name,” but with a good automated GUI testing tool, one test may fail, but the rest of the automated GUI test suite keeps running (see Fowler’s continuous integration). Furthermore, with a good GUI testing tool, something like this is also a minor change to get the test running again.

I put my Scala String Utilities library on Github a few days ago. It includes my Q String Interpolator, and several other string utility functions. It also demonstrates how to write ScalaTest and ScalaCheck tests with an SBT project.

New book/story idea: Life is a bit of a game, and as a result you’re put in the vicinity of your soulmate. Not right next door per se, but somewhere within your range of life such that you will encounter this person, such as the friend of a friend, someone you work with, a person you run into at a store, etc. So the game is, out of all the people you meet as your life unfolds, can you identify your soulmate? And maybe as a secondary plot, how do you handle it if you get get close but make a mistake ... say you marry a person which creates circumstances that put you in the vicinity of your soulmate, and you later realize your mistake?

This is a favorite quote from the book, Zen Training. Anyone who has ever meditated deeply at home, in the mountains, or on retreat has probably had these feelings.

A favorite quote from the book, Zen Training

Scala community build is an interesting project, which is described like this:

“This repository contains configuration files that enable us to build and test a corpus of Scala open source projects together using Lightbend's `dbuild`. How big is it? It’s 3.2 million lines of Scala code, total, from 185 projects (as of January, 2019), and takes about 15 hours to run.”

“Why do this? The main goal is to guard against regressions in new versions of Scala (language, standard library, and modules). It’s also a service to the open source community, providing early notice of issues and incompatibilities.”

As a note to self, I added SSL/TLS certificates to a couple of websites using LetEncrypt. Here are a couple of notes about the process:

  • Read the LetEncrypt docs
  • They suggest using certbot
  • Read those docs, and follow their instructions for installing the packages you’ll need
  • Make sure your server firewall rules allow port 443 (You may get an “Unable to connect to the server” error message if you forget this part, as I did)
  • After making some backups, run this command as root (or you may be able to use the sudo command):

Here’s a link to my Scala String utilities, which includes a few hopefully-useful string utility functions, some of which are shown in the image. My “Q” interpolator is also included in that library.

Scala String utilities functions