# Pi is Meaningless

Ladies and Gentlemen. Introducing…a completely random series of numbers:

3.11037 55242 10264 30215 14230 63050 56006 70163 21122 01116 02105 14763 07200 20273 72461 66116 33104 50512 02074 61615

Those are the first 100 digits of Pi in base 8.

“Base 8?” you screech. “Why base 8”.

Why not? We humans use base 10 because (scientists conjecture) we have ten fingers, and our ancestors used them to learn how to count. Having five digits at the end of each appendage is common in most animals we are familiar with.

But if the octopus had become the dominant species on Earth, and developed complex language, math and the internet (underwater), it is quite likely that it would have come up with a base 8 number system.

Therefore, octopuses would celebrate Pi Day by reciting its digits in base 8.

Or not.

Maybe they would think Pi is boring.

Like me.

No I’m not an octopus. And no, that’s not me. But it’s cute, don’t you think?

The point is:

I don’t understand why people pride themselves on being able to recite the digits of Pi (in any base). It is a waste of valuable gray matter that could be used for something useful.

It has been found that the digits of Pi are indistinguishable from a random sequence of digits, no matter how high you count. If you select any sequence of digits in Pi (like, say, the first 100 digits starting at the billionth digit), you will find no particular bias or pattern. In fact, the likelihood of any digit (or sequence of digits) occurring is statistically flat: evenly-distributed. It’s as random as it gets (although there is no PROOF yet of the “normality” of Pi).

This is why I suggested in a previous blog post that the music in this video:

…is meaningless. This guy Blake (who is a fine musician) could have just as easily used the digits from a random number generator.

By the way – I now see that there was a legal battle regarding copyright infringement in a case of using Pi as the basis for a melody.

Two unfortunate first-world preoccupations rolled into one.

Instead of fetishizing the digits of Pi (or any irrational number), why not explore the teachable aspects of Pi such as this:

…or this:

…or this:

According to Wolfram,

What’s interesting is how chaos is formed – whether in an abstract number system or in a natural system. The digits of Pi should be understood as the result of a dynamical process that emerges when we try to find relationships between circularity and linearity. The verb is more meaningful than the noun.

-Jeffrey

Advertisement

# Programming Languages Need Nouns and Verbs

I created the following Grammar Lesson many years ago:

Like many people my age, my first programming language was BASIC. Next I learned Pascal, which I found to be extremely expressive. Learning C was difficult, because it required me to be closer to the metal.

Graduating to C++ made a positive difference. Object-oriented programming affords ways to encapsulate the aspects of the code that are close to the metal, allowing one to ascend to higher levels of abstraction, and express the things that really matter (I realize many programmers would take issue with this – claiming that hardware matters a lot).

Having since learned Java, and then later…JavaScript, I have come to the opinion that the more like natural language I can make my code, the happier I am.

Opinions vary of course, and that’s a good thing. Many programmers don’t like verbosity. Opinions vary on strong vs. weak typed languages. The list goes on. It’s good to have different languages to accommodate differing work styles and technical needs.

But…

if you believe that artificial languages (i.e., programming languages) need to be organic, evolvable, plastic, adaptable, and expressive (like natural language, only precise and resistant to ambiguity and interpretation), what’s the right balance?

Should Programs Look Like Math?

Should software programs be reduced to elegant, terse, math-like expressions, stripped of all fat and carbohydrates? Many math-happy coders would say yes. Some programmers prefer declarative languages over procedural languages. As you can probably guess, I prefer procedural languages.

Is software math or poetry? Is software machine or language?

I think it could – and should – be all of these.

Sarah Mei has an opinion. She says that Programming is Not Math.

Programming with Nouns and Verbs

First: let me just make a request of all programmers out there. When you are trying to come up with a name for a function, PLEASE include a verb. Functions DO things. Like any other kind of language, your code will grow in a healthy way within the ecology of human communicators if you make it appropriately expressive.

Don’t believe me? Wait until you’ve lived through several companies and watched a codebase try to survive through three generations of developers. Poorly-communicating software, put into the wrong hands, can set off a pathological chain of events, ending in ultimate demise. Healthy communication keeps marriages and friendships from breaking down. The same is true of software.

Many have pontificated on the subject of software having nouns and verbs. For instance, Matt’s Blog promotes programming with nouns and verbs.

And according to John MacIntyre, “Take your requirements and circle all the nouns, those are your classes. Then underline all the adjectives, those are your properties. Then highlight all your verbs, those are your methods”.

When I read code, I unconsciously look for the verbs and nouns to understand it.

When I can’t identify any nouns or verbs, when I can’t figure out “who” is doing “what” to “whom”, I become cranky, and prone to breaking things around me. Imagine having to read a novel where all the verbs look like nouns and all the nouns look like verbs. It would make you cranky, right?

The human brain is wired for nouns and verbs, and each is processed in a different cortical region.

There are two entities in the universe that use software:

(1) Computers, and (2) Humans.

Computers run software. Human communicate with it.

-Jeffrey