Categories
baha'i tech

Test driven development

I intended this blog to have some focus on religion and on technology, the two areas that I spend most of my time thinking about. So far I haven’t felt able to contribute anything useful about tech, but here’s a topic that for me applies to both — the parallels between a persons’ growth through life, and the process for writing working computer software.

Both are usually iterative, and involve verification that changes comprise progress in the desired direction and do not reintroduce old problems. Of course this analogy only goes so far, but it’s fun to play with.

So when writing a new program in this paradigm, the first step is to construct the tests that it must pass, and then to run those tests and watch it fail (because there is no program yet). This verifies that the tests actually do measure what they’re supposed to. (One recent beginner book that emphasizes this process is Ken Youens-Clark’s Tiny Python Projects (Manning, 2020)). Then you gradually add functionality until those tests pass.Then later on as changes are made, the tests are re-run to make sure nothing has broken.

And as we grow up as people, situations come up to test our abilities and our reactions. As a little kid trying to walk, this is very visible; as an older person encountering trying situations, or opportunities to be kind or helpful, we might look back on those and say to ourselves something along the lines of “I thought I was a really nice person, but I completely handled that situation wrongly”, or “I thought I was over that weakness, but I just fell into the trap again.” With luck, we’ll try to do better the next time, or the next time, or … eventually.

With enough social status, or success in our careers, or money, it’s possible to be more insulated from tests — especially if we’re around people who are just like us, who reinforce our own self-esteem a little too much, and we can coast along feeling self-satisfied. Then life hauls out that Python test-harness and shows us, and maybe those around us, that it’s time to improve some more. Over time (sometimes a very looong time) this increases our abilities, like the little kid who achieves walking, then walking without falling, then running, then helping in the family, then helping in a community …

Something we can do to help this, maybe, is to ask 3 questions at the end of each day:

  1. what did I do well today?
  2. what could I have done better?
  3. what were my blessings?

Bring thyself to account each day ere thou art summoned to a reckoning; for death, unheralded, shall come upon thee and thou shalt be called to give account for thy deeds.

— Bahá’u’lláh, Hidden Words

Categories
baha'i

Another cheerful video

A bit similar to “Another World“, a video I mentioned last month, this musical one is short and cheerful: “Waves“.

Make us as waves of one sea …

Addendum: The composer of this song is Elika Mahony, and another version of it is here. Both versions are valid, I’m not sure what their publishing arrangement is.

I was listening to a podcast where she is interviewed, and when asked where she’s from she says “I was born in the US, raised in Kenya, and my parents are from Iran … I’ve lived in China for the last 20 years …”

What this brings to mind is just how many of the generation after mine have biographies like that, a mix of cultures and places listed as a normal path, nothing special.

With a little effort I could cite other stories like that among people I follow online and those in our local community. One of my wife’s acquaintances speaks 7 languages and helps her communicate with African immigrants who don’t speak much English, but whose second language is often French (there’s a reason for the phrase lingua franca).

Some of this generation are actually experiencing, if imperfectly, that “The earth is but one country, and mankind its citizens,” and it’s great!