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

“If you’re best player has an unhappy attitude when he shows up to work, there’s no joy, there’s no passion to what he brings, that affects the team, it affects the locker room, it’s huge. Teams need leaders, teams need passion, teams need energy, they need positiveness, they need joy.”

~ Chad Brown, about thirteen minutes into this 104.3 The Fan recording, in a discussion about star player Kyrie Irving of the Celtics constantly appearing unhappy, and the team being 10-2 without him.

If you can handle the weather in Boulder, Colorado this winter (2018-19) you can probably handle the weather in Alaska. Well, southern Alaska, anyway. This is the weather in Talkeetna, Alaska or Boulder, it doesn’t really matter because they’re about the same. Of course the huge difference is the darkness in the winter. (Image from wunderground.com).

This Boulder, Colorado winter reminds me of Alaska

I’ll write more about this shortly, but yesterday I created a little video of a demo application I call Futureboard. It’s a Scala/Swing application, but it works like Flipboard in that it updates a number of panels — in this case Java JInternalFrames — simultaneously every time you ask it to update.

The “update” process works by creating Scala futures, one for each internal frame. When you select File > Update, a Future is created for each news source, and then simultaneous calls are made to each news source, and their frames are updated when the data returns. (Remember that Futures are good for one-shot, “handle this relatively slow and potentially long-running computation, and call me back with a result when you’re done” uses.)

Here’s the two-minute demo video:

“Strive for beauty and elegance in every aspect of your work.”

~ Daniel Read

March 5, 2019: For a limited time only, I put the paperback version of “Hello, Scala” on sale for $10 (US) on Amazon.

P.S. - It won’t get any cheaper than this.

Hello, Scala paperback book cover

“Always stretch from the source, the core, the foundation of each asana. Keep your attention internal, not worrying about what others see, but what the Self sees. Each movement must be an art, an art in which the Self is the only spectator.”

B.K.S. Iyengar, Light on Life: The Yoga Journey (with a few minor edits by me)

On March 4, 1993, Jim Valvano gave a very emotional and inspirational video. “Time is very precious to me, and I don’t know how much I have left, and I have some things I would like to say.”

A terrific quote from Kareem Abdul-Jabbar about auctioning off his memorabilia and giving the $3M+ proceeds to his Skyhook Foundation charity that helps kids learn about science, technology, engineering and math:

“When it comes to choosing between storing a championship ring or trophy in a room or providing kids with an opportunity to change their lives, the choice is pretty simple: Sell it all. Looking back on what I have done with my life, instead of gazing at the sparkle of jewels or gold plating celebrating something I did a long time ago, I’d rather look into the delighted face of a child holding their first caterpillar and think about what I might be doing for their future. That’s a history that has no price.”

If you ever think you have to be perfect with a product or service in its first release, I encourage you to watch the Match Game tv series on Amazon Video. The first episodes of Match Game 73 were horrible; Gene Rayburn wasn’t comfortable, the writing was extremely poor, and all the celebrities (except for Jack Klugman) seemed uncomfortable. Then flash forward to Match Game 75 (or 78) and you’ll see a much better show.

For another example, take a look at the original iPhone and compare it to what’s available now. It was revolutionary, but it was also a minimum viable product.

As a brief note, and assuming that you already know a little bit about RxJava, here’s the simplest possible RxJava 2 “Hello, world” example I think you can create:

package hello;

import io.reactivex.Observable;

public class HelloWorld {

    public static void main(String[] args) {
        Observable<String> observable = Observable.just("Hello, world");
        observable.subscribe(System.out::println);
    }

}

“Testing takes time, just like structural analysis takes time. Both activities ensure the quality of the end product. It’s time for software developers to take up the mantle of responsibility for what they produce. Testing alone isn’t sufficient, but it is necessary.”

~ Neal Ford (as seen on this tweet)

Summary: Simple functional programming techniques in Scala make certain OOP design patterns, such as the Strategy Pattern, obsolete.

The OOP Strategy Pattern

Wikipedia describes the Strategy Pattern with this UML diagram:

A UML diagram describing the Strategy Pattern

I was just updating my Example UML Use Case diagram article and it occurred to me that if you're a Business Analyst, there are a couple of questions you can ask yourself as you write a Use Case (or User Story) that will help improve the quality of your writing. Two questions specifically come to mind:

  1. What are the main points of this use case? (Which might also be phrased, "What points about this business process do I need to make sure everyone really agrees about?")
  2. Are the statements I've written testable?

(Note: I originally wrote this article in 2010 or 2011, but I tend to like articles that I wrote while in the midst of a ton of design, programming, and testing work, and this is one of them.)

Over the last 18 months I've been working with a 24x7 manufacturing group, and no matter what I say, they always have the same two requests/demands:

  1. The software system must not fail, and
  2. If it does fail for some reason, it needs to be able to recover properly from the failure.

Simply put, (a) the machines must keep moving, and (b) nobody wants the phone call in the middle of the night when the machines stop moving.

From 2015-17 I spent most of my time in hospitals and in bed, and went unconscious seven times. Today I can bench 210 (all the weight on the machine), work the elliptical thirty minutes, and practice yoga every night. Never give up.

Happy Rare Disease Day!

(If you’d like to donate to people working to cure my disease, please visit The Mastocytosis Society website.)

This is a view of the Rocky Mountains in Colorado on February 27, 2013. The top photo is from the previous day, when a storm rolled in in the morning. The bottom view is from the following morning when the skies were perfectly clear.

Rocky Mountains in February: Snowstorm, then clear

“So much complexity in software comes from trying to make one thing do two things.”

~ a good quote from Ryan Singer (as seen on @CodeWisdom)

One woman can make you fly like an eagle, another can give you the strength of a lion, but only one in the Cycle Of Life can fill your heart with wonder and the wisdom that you have known a singular joy.

~ Twin Peaks

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

~ Patanjali (via Iyengar)

The person who was Employee #2 at Pinterest (and then left) wrote a good article titled, Reflecting On My Failure to Build a Billion-Dollar Company.