Alvin Alexander | Java, Scala, Unix, Perl, Mac OS X

“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

Table of Contents1 - Major points of my "User Logs In" Use Case2 - The "User Logs In" user story3 - Are my statements testable?4 - What I left out5 - User Stories, Use Cases, and Requirements6 - Back to the questions

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:

  • 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?")
  • Are the statements I've written testable?

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

I keep thinking about this lately, so I thought I’d post a list of my favorite tv series that lasted only one season. In no particular order they are:

Table of Contents1 - Sample data2 - From match expressions to higher-order functions3 - Notes4 - Resources5 - Comments

I originally wrote a long introduction to this article about Scala Options, but I decided to keep that introduction for a future second article in this series. For this article I’ll just say:

  • idiomatic Scala code involves never using null values
  • because you never use nulls, it’s important for you to become an expert at using Option, Some, and None
  • initially you may want to use match expressions to handle Option values
  • as you become more proficient with Scala and Options, you’ll find that match expressions tend to be verbose
  • becoming proficient with higher-order functions (HOFs) like map, filter, fold, and many others are the cure for that verbosity
Table of Contents1 - Effects are related to monads2 - Not a side effect, but the main effect3 - Effectful functions return F[A] rather than [A]4 - Summary5 - Notes

When you get started with functional programming (FP) a common question you’ll have is, “What is an effect in functional programming?” You’ll hear advanced FPers use the words effects and effectful, but it can be hard to find a definition of what these terms mean.

“People inspire you, or drain you. Pick them wisely.”

~ Hans F. Hansen (image from positivelifetips.com)

People inspire you, or drain you. Pick them wisely.

“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)

As I was sitting in my favorite coffee shop in Seward this afternoon, a dog walked in the back door and just stood there, looking at everyone. Owner tells me he was looking for a good poker game. ;)

~ photo from Seward, Alaska, February 25, 2011

A dog walks into a coffee shop

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.