Introducing Harmonious

an impossible shape that sort of looks like a sharp symbol (hash sign, pound sign, or octothorpe)


The Exhaustive Piano and Guitar Chord and Scale App

For Students, Composers, Songwriters, Arrangers & Working Musicians

What if you could learn music theory from a mentor that had all the answers? Start with what you know and follow your curiosity, confident that you have all musical options at your disposal, since Harmonious is the most complete chord and scale map. Find extensions, substitutions and chromatic flavors that lie at the edge of the familiar and the exotic. See connections through the dual lens of chords and scales, linking harmony and melody.

Harmonious is live. Learn about it.

Several years of work and a few decades of studying music theory and the result is something I am proud to announce. Harmonious is live on the iOS App Store and live on the web at!

  1. If you have an iOS device (iPad and iPhone, even iPod touch) contact me and I can give you a promotion code so you can download the app for free if you do not feel like dropping $4.99 on the app. If you are so inclined, you can leave a star rating and maybe write a review.

  2. If you are interested in hearing more about Harmonious when there are updates and new features in the future, please sign up for the infrequent Harmonious Email Newsletter. You can unsubscribe at any time.

  3. If you do not have an Apple/iOS device, but you are at a computer or you have an Android device, please feel free to check out the app live on the website at It should look good on Android devices and large screens too, and if it doesn't I would love to hear your feedback.

Here's to a great start on an ambitious project!


New Dice Game in Vegas

a photo of a red die, a purple die, and a silver die

A casino on the Las Vegas Strip, the Bernoulli Hotel and Casino, has introduced a new dice game, called Red, Purple, Silver. The game uses (up to two pairs of) three six-sided dice:

  • The Red dice are all labeled with the numbers 1, 2, 9, 14, 15, 16
  • The Purple dice are all labeled with the numbers 3, 4, 5, 10, 17, 18
  • The Silver dice are all labeled with the numbers 6, 7, 8, 11, 12, 13

These are fair dice, regulated by the Nevada Gaming Commission, meaning no one is cheating anyone by making dice that favor landing on any side over the others. You can even test this yourself before you play the game.

The Game

There are two modes of play, called Game 1 and Game 2.

Game 1

In Game 1, you play twenty rounds of the following: player rolls her single die once, dealer rolls his single die once, and the higher number wins the round. The winner of the game is the person who wins more rounds. If both win ten, extra rounds are played until a winner is determined. The bet is applied to the entire game, not individual rounds and cannot be changed until the end of the game.

Game 2

In Game 2, you play twenty rounds of the following: player is given two dice of the same color to roll, rolls them both simultaneously, and sums them. The dealer does the same with his two same-colored dice. The higher sum wins the round. Ties (a round with the same sum for player and dealer) are re-rolled and do not count as one of the twenty rounds. The winner of the game is the person who wins more rounds. If both win ten, extra rounds are played until a winner is determined. The bet is applied to the entire game, not individual rounds and cannot be changed until the end of the game.


Before die selection (see below), the player bets a certain minimum by moving their stack of chips to a certain place on the table, Square A or Square B. When the twenty rounds are over, if the dealer wins either Game 1 or Game 2, he keeps your stack of chips. If you win Game 2, you get your stack back plus a new stack the same size. Double or nothing. If you win Game 1, you get your stack back plus a new stack the same size plus a smaller stack one third the size, rounded down. 2.3333x or nothing.

Die Selection

When you walk up to the table, you do not get to choose Game 1 or Game 2 directly. Instead you choose from Scenario A or Scenario B by placing your chips in Square A or Square B, respectively. After bets are paid off, dice are returned to the dealer, and the player can again choose Scenario A or Scenario B and play another twenty rounds.

Scenario A

In scenario A, the player chooses her die color first and chooses Game 1 or Game 2. Then the dealer selects a die color and they play twenty rounds of the game chosen by the player.

Scenario B

In scenario B, the dealer chooses a die color first, then the player chooses her die color, then the dealer chooses Game 1 or Game 2, and they play twenty rounds of the dealer's chosen game.

Are You Up For It?

Will the casino make money over the long term? Should you play this game? (This is a trick question. Casinos only play games where the dealer makes money over the long run. If the casino thinks the game is good for the casino, you should never play it! Unless it is a game of some skill, like poker. But even then, other players will probably kick your butt.)

For the answer and some analysis, see my earlier article about the dice.


Benefits of Functional Programming

A friend asks:

[Functonal Programming in Python] is an interesting way to see things. I find it fascinating, but what do you think is the main benefit? For example, lambdas are cool syntactically, but I don't see a huge reason for them other than sugar. Python seems to treat function objects basically like function pointers in C, and lambdas are like safe, single expression C macros that you loop through lists. Does functional programming offer more than syntax? Even if it's merely syntax to help one think in a different paradigm that's valid, but I'm struggling to see the value here in the beginning, whereas with C++ the benefits of OOP was easily apparent.

In addition to passing first class functions and having APIs with callbacks, etc., one of the main benefits to functional programming revolves around state. All old state is never updated or copied or klobbered in-place, but is kept around as is. All data structures in purely functional languages are 100% immutable. This eliminates large classes of bugs (but makes coding certain kinds of complex state updates a little more awkward, honestly) and makes testing easier and more mathematical. This also allows 'time-travel' or 'undo' or rewind at the granular level.

(See Immutable.JS, persistent data structures in JavaScript.)

These special vector collections and hash maps (dictionary / object), based on work by the late Phil Bagwell, allow basically O(1) lookups and appends with no copying. (There is more overhead/book-keeping than normal low-level C-style data structures but the Big-O performance is still shockingly amazing and scalable.)

This fits with the expression-based approach that most FP languages encourage because you can usually write code that describes declaratively how to compute something, instead of the steps and order to compute it. And those functions can be tested independently since there is little or no 'implicit runtime state' to have to supply at testing time.

Imagine looking at a code base and seeing each function in isolation and knowing (Haskell, at least!) that each piece of code completely and explicitly tells you what inputs it takes, and what output it computes, and that each function has zero side effects (and hence no other effect on any other code ever, just taking CPU time and allocating some memory and returning a result). This also means that if you can prove (formally or informally) that a set of functions are correct for all of their individual inputs, and a combining function is correct, then the combination of those functions is guaranteed to be correct. In normal programming, this is not the case because of implicit, hidden global (or localized) runtime state. When refactoring a chunk of imperative (non-FP) code, what you often end up doing is making the inputs explicit, etc. so that the block of code can be cut out and isolated and used anywhere else. In FP this is already done, every where!

FP is not a panacea but purely functional (stateless) coding style (in C#/C++ = static classes with only static methods and no static mutable state) is awesome because it makes all dependencies explicit instead of hiding state in a 'this' object, which is just a slightly more abstract version of the global state anti-pattern—now your global state is just hidden behind myriad objects! Purely functional code can be used anywhere 'as-is' and expected to work in all circumstances, with no semantic (incorrectness) penalties for reordering calls to functions, etc. You can write large amounts of code in OOP languages in a purely FP coding style and get 90% of the benefit of FP, (but you will still wonder about that last 10%). For example, objects with no mutable state, just set their fields once in the constructor, and provide methods that compute things but do not mutate internal state, etc.


Learning to Live

(John Dehlin interviews Jon Ogden about a framework for living and Jon Ogden immediately (five minutes into second podcast, #786) starts blowing my mind with sentence after sentence of concentrated Oh-My-Ogd-ness. Here are some scattered notes for my own reference.)

Quoting no less than ancient philosophy, Immanuel Kant, Bertrand Russell, Albert Einstein (a follower of Spinoza's moral and humanistic argument), the framework centers on the transcendentals (each worth pursuing for their own sake):

  1. Truth
  2. Beauty
  3. Goodness

Fluffy, warm, fuzzy words? Actual, no; it's a framework for what to focus on and how to spend one's time, to ensure the basic aspects of a happy life.

I am immediately reminded of one of the greatest pieces of prog metal, the song “Learning to Live” by Dream Theater, from the album Images & Words, with lyrics written by Mr. John Myung, a deeply believing Christian, and the world's hardest working bass player, wherein Myung writes from the perspective of an individual who contracted AIDS in the 90s:

I need to live life
Like some people never will
So find me kindness
Find me beauty
Find me truth
When temptation brings me to my knees
And I lay here drained of strength
Show me kindness
Show me beauty
Show me truth
I won't give up
Till I've no more to give

Ogden mentions that Stephen Covey, in The Seven Habits of Highly Effective People, talks about four types of exercise: intellectual, spiritual, social, and physical.

Ogden says that physical exercise is not his focus in the book and that is fine. (As a side note I would argue that the LDS Church could do more to promote proactive physical health as a spiritual requirement for a life that can give more than it takes, and focus less on the thou shalt nots of the Word of Wisdom and more on putting all that constant nagging to better use, instead urging the saints to switch off their TVs and get up off their couches and move their dang bodies, so they can “run, and not be weary; and ... walk, and not faint” (Isaiah 40:31) in the here and now, instead of waiting for the resurrection, and stop overeating so they can have “health to th[e] navel, and marrow to th[e] bones” (Proverbs 3:8, also D&C 89:18–20). I'd like to see exercise treated as a commandment, to destroy the attitude that says “I don't smoke or drink so I get perfect health for free.” Which attitude then devours the lives of various family members, or leaves others maimed. I have strong feelings about physical health and especially exercise as it relates to mental health.)

Putting this all together, we get:

  1. Physical Exercise = Strength (Endurance)
  2. Social Exercise = Goodness = Kindness
  3. Spiritual Exercise = Beauty
  4. Intellectual Exercise = Truth

And that order is pretty important. It reminds us of Mazlow's Hierarch of Needs, if not exactly, with 1 on the bottom and 4 on top, like a pyramid, with Strength making the foundation and Truth being the capstone.


0. The Attitude That Leads to Strength and Endurance.

Ogden and Dehlin do not address this but I will just say: pick two or three (or six) days a week and a sustainable exercise plan, and always show up, no excuses. (My plan is swimming or hoops on Tuesday and Thursday, and pushups six days a week. Yours may vary but should be something that you can ease into and can keep going indefinitely. Don't hurt yourself.)

If you are ill (e.g. virus) or otherwise have to go through the motions (but only on occasion), so be it: make a substitution. Keep the habit going like your life depends on it; it does. If you have to adapt (vacation, emergency, etc.) then plan or adapt, or substitute, but do not let the habit fall flat. Rain or shine, you will be there.

You can be tougher than the other folks even if you are a scrawny and pasty weakling like me: I am there swimming in the cold November rain and they are nowhere to be seen. I am as tough as the tough guys who could bench press twice my body weight. (They may be at a gym or running on a treadmill when it rains, so that is great too.) And I acknowledge that I could fall off the bandwagon at any time so I am willing to admit that I am weak and just a hair's width away from losing the habit. This is the attitude that leads to Strength or Endurance.

Regarding diet, see how to eat well on $1 per person per meal. I am lucky to have a spouse who more than makes this easy, but I do cook sometimes and I am in charge of dishes, and I help with shopping and meal planning.

The attitude that avoids overeating is the idea that being hungry is fine. You should be hungry between meals. That means you are burning calories. If your energy levels are low when you are not constantly stuffing your face then you need to exercise regularly. If you train your body to inertness it will become expert at it. If you train your body to use a moderate to low amount of high quality calories, it will become efficient at it.

Back to jotting down notes from Ogden:

1. The Attitude That Leads to Truth Is the Attitude That You Could Be Completely Wrong

If you cultivate that attitude and hold on to it, you are more liking to be amenable to correction, which allows you (over time) to get more and more toward the truth. (“You admit that you are stupid, etc.”) The opposite attitude, digging in one’s heals, will ensure that Truth stays far away from you. If you believe you already have the Truth, you will forever bask in ignorance.

2. The Attitude Towards Beauty Is the Acceptance That Perhaps Living Mindlessly Is Not What Life Is About

The idea that there is some higher form of Spirituality or Connection to something higher than oneself, Meaning, Purpose, or connection to the Ineffable; or Transcendence.

Living our life with this attitude leads us to do certain things like getting off Netflix all the time, getting into face-to-face communication, or camping, or singing in a group, etc. etc. Even if we disagree about belief, we can try things that are more likely to uplift us or bring us deeper joy and perspective, i.e. Beauty.

3. The Attitude Towards Goodness Is Really Actively Seeking That Which Alleviates Suffering in the Lives of Others

I am going to see people who are suffering and I am going to alleviate their suffering. We may need a weekly reminder not just to know these things intellectually, but to embody them in our lived experience. (I, Jared, could do much more in this vein.)

Applying It

More Ogden notes:

There is more than one Virtue. “Truth is all that matters.” That is not True! That is not the only value. There is a lot of utility in Beauty and Goodness (arguably more utility than Truth for it's own sake?). There is a risk to focusing on one Virtue to the exclusion of the Others.

  • The pursuit of Truth without Beauty makes us cynical, academic, cold.
  • The pursuit of Truth without Goodness makes us lonely. Give a little (or a lot) and see others as more important than just being right.
  • The pursuit of Beauty without Truth makes us gullible, susceptible to being taken advantage of.
  • The pursuit of Beauty without Goodness makes us selfish, hedonistic. Volunteer and get involved to help others for Beauty to mean anything in practice.
  • The pursuit of Goodness without Beauty is exhausting. The checklist of doing all this volunteer work but letting it empty us without refilling.
  • The pursuit of Goodness without Truth is misdirected. Incorrect ideas can be harmful and damaging even when pursued in good faith.

Ken Wilbur, Yuval Noah Harari

  • I = Beauty, personal spiritual experience = Subjective Reality
  • We = Goodness = Inter-subjective Reality
  • It = Truth = Objective Reality

Bringing Back Myth (Harari)

Ogden discusses What Next, with the idea of getting toward a 21st Century Myth. Tremendous power in myth-making. Not trivial; foundational. Harari: Story-telling is the reason humans are different from all the other animals. Money, religion, technology, societal structure. Ken Wilbur: “Transcend and Include” both sides of the aisle. Myth of Trans-humanism, evolving and becoming more perfect (the three virtues), not a divine being necessarily, but a more perfect being.


My wife and I go hiking sometimes on Sunday morning, and we do litter pickup. That gives us Beauty and Strength and some Kindness. We also make bird count checklists and practice learning (Truth) how to identify birds. That is better than just Beauty and sometimes Truth on a Sunday morning (and arguably better than more sitting, being counter to Strength).

Again I have much room for improvement.