Dad’s nerd

My dad was thirty when I was born, so a few years ago I had the opportunity to send him this for his birthday. Happy Father’s Day in heaven, Dad!

A birthday greeting

(Stick with it, it’s worth it.)

The counting system we normally use is called “base ten.”  It uses ten distinct digits (zero through nine), and the columns of a multi-digit number are powers of ten.  The rightmost column is “ones” (1 is 10 to the power of 0), the next column is “tens” (10 to the power of 1), the next column is “hundreds” (10 to the power of 2), and so on.

Example: the number 412 is understood as “four hundreds plus one ten plus two ones.”

Base ten is convenient for humans, who have ten fingers to count on.  But it’s inconvenient for computers, which count using “bits,” each of which is a microscopic on-off switch.  This makes it more convenient for computers to count in “base two,” which uses two distinct digits (zero and one, corresponding to a bit that’s off or on).  The columns of a multi-digit base-two number are powers of two.  The rightmost column is still “ones” (because 2 to the power of 0 is 1) but the next column is “twos,” then “fours,” then “eights,” then “sixteens,” and so on.

Example: the base-two number 110011100 is understood as “one 256 plus one 128 plus one 16 plus one 8 plus one 4” (which is the same as the base-10 number 412, by the way).

As you can see, base two requires many more columns than base ten to express the same number.  Computers don’t care about that – but the people who work with computers do.  Base two counting is very inconvenient for them.  But converting back and forth between base 10 and base 2 is onerous, because even computer nerds don’t like doing unnecessary arithmetic.

One common solution is to deal not in base two or in base ten but in base eight.  Base eight uses eight distinct digits (zero through seven) and the columns of a base-eight number are “ones,” “eights,” “sixty-fours,” and so on.

You might think that adding yet another counting system is a needless complication, but the cool thing about base eight is that each group of three base-two digits always corresponds to the same base-eight digit:

Base twoBase eight
0000
0011
0102
0113
1004
1015
1106
1117

This makes converting between base two and base eight easy.  Just take three base-two digits at a time (from right to left) and replace them with their base-eight counterpart:

110011100 -> 110 011 100 -> 634 (which is the base-eight version of 412).

Base eight is often called “octal,” and base ten is often called “decimal.”  Now you have enough information to understand this old programmer’s joke:

Q: Why is Halloween like Christmas?
A: Because OCT 31 = DEC 25!

But we’re not done.  Base eight is handy, but not as handy as it can be, because as you probably know, computer memory is divided into bytes, and each byte is eight bits long.  You can’t evenly divide eight bits into groups of three.  And there’s some ambiguity when you string together multiple bytes in a row.  Suppose you’re dealing with these two bytes:

11010001  10011100

Should you group these sixteen bits into threes like this:

11 010 001  10 011 100 -> 321234 (base eight)

(where each byte is grouped into threes separately) or like this:

1 101 000 110 011 100 -> 150634 (base eight)

(where all sixteen bits are strung together and then separated into groups of three)?

To avoid these problems, it’s more common for computer folks to use not base two, not base ten, and not base eight, but base sixteen!  Base sixteen has sixteen distinct digits: zero through nine as in base ten, then A for a single-digit “ten,” B for a single-digit “eleven,” C for a single-digit “twelve,” D for “thirteen,” E for “fourteen,” and F for “fifteen.”  The columns of a base-sixteen number are “ones,” “sixteens,” “two-hundred-fifty-sixes,” and so on.

In base sixteen, 412 is written as 19C.  (One 256 plus 9 sixteens plus twelve.)

Like base eight, base sixteen – which is also called “hexadecimal” (or “hex” for short) – is easily converted to and from base two, because every group of four base-two digits corresponds to a base sixteen digit.

Base twoBase sixteen
00000
00011
00102
00113
01004
01015
01106
01117
10008
10019
1010A
1011B
1100C
1101D
1110E
1111F

And grouping base-two digits four at a time instead of three at a time makes it very natural to represent any eight-bit byte as a two-digit hexadecimal number.

11010001  10011100 -> D1 9C

Now for the punchline of this nerdy shaggy-dog story.  This year you are turning 80 and I am turning 50.  And DEC 80 = HEX 50!

This is the kind of thing that makes nerds like me turn cartwheels of joy.  And before you roll your eyes or shake your head, let me just remind you of who raised this particular nerd.

Happy birthday, Dad.  I love this numeric coincidence, but not as much as I love you.

Year in rearview

In the latter part of this year I ramped down my posting on Facebook (as I had previously done on Twitter) in favor of BlueSky. Time to get serious about resisting the oligarchs. [Previously.]

  • [On Jan 1st, friend asks, “Where’s my #$%^& flying car?!”]

    https://youtu.be/lhALK64e4bk

  • First Dad’s-birthday-without-Dad. He would have been 88 today – his target age (though I always told him he should aim for 100). He very nearly made it.

    We all miss you Dad.

Continue reading “Year in rearview”

’23 skidoo

The era of social media is on the wane, and here’s the proof: I wrote far fewer Facebook (and other) posts and comments than in years past, and instead of spending the last few days of 2023 recapping them like I usually do, I felt no urgency to, and did other stuff instead.

Toodle-oo, ’22

Not bad, 2022, not bad. Military aggressors and self-important blowhards pwning themselves; wrongdoers held to account; monopolies declining; voting rights, climate solutions, and labor on the rise. 2023 are you paying attention? (Previously.)

  • [Friend comments, “Fuck this shit” when Betty White dies right at the end of 2021.]

    I like how another FB friend put it: “History will align the end of this dark period with the passing of Betty White. She sacrificed herself to usher in a new era of health, joy, and kindness.”

  • Continue reading “Toodle-oo, ’22”

Santa Claus sta venendo al villaggio

A beloved (possibly only by me) tradition continues! (Previously.)

Earlier this year I completed the Duolingo course in Italian. Let’s see how well I can translate “Santa Claus Is Coming To Town” into Italian! Herewith, the translation back into English by Google Translate of my attempt.

Better look around
Better not cry
Better not be sad
I’m telling you why
Santa Claus is coming to the village

He’s making a list
And looking at it twice
He will know who is bad and who is good
Santa Claus is coming to the village

He sees you when you are sleeping
He knows when you’re awake
He knows if you’ve been bad or good
Then be good for being good

Better look around
Better not cry
Better not be sad
I’m telling you why
Santa Claus is coming to the village

What is easy about pie?

Several months ago it briefly looked like the University of Chicago might be on the list of schools to which Archer, our high-school senior, might apply. In the end he did not, but he got far enough to learn the application requirements, which include writing an essay on one of several creatively chosen topics, including, “What if the moon were made of cheese?” and “It’s said that history repeats itself, but what about other disciplines?”

I liked the sound of one prompt so much that I immediately sat down and wrote my own essay on the topic: “What is so easy about pie?” I didn’t show it to him until after college-application season was over, not wanting to unduly influence him.

What is easy about pie?

Nothing! It is a simpleminded lie — the pie lie! — meant, perhaps, to give comfort in a cruel and indifferent world. “Easy as pie!” “Santa Claus!” “American exceptionalism!”

I turn to no less an authority than the great Carl Sagan, who said:

If you wish to make an apple pie from scratch, you must first invent the universe.

Does that sound easy to you?

Even granting the existence of the universe — the gravity crushing hydrogen into helium in the heart of the sun, and binding the Earth to its orbit; the vast web of interdependent organisms deriving their life energy, ultimately, from that nuclear fusion; the evolved apes with the means to harvest that life for flour, sugar, cinnamon, butter, and apples — even granting all of that (and that’s a lot to grant), it’s still not easy, as the columnist Megan McArdle pointed out in a recent essay for the Washington Post, “Can America save its national dish?”:

In 2019, more than 50 million Americans used frozen pie crusts, and more than 40 million used the refrigerated kind. Even though store-bought crust is terrible.

Yet commercial bakeries don’t do much better.

Why would we Americans use terrible store-bought pie crust if pie is easy? Why can’t even commercial bakeries get it right if pie is easy? Easy: pie is not easy.

Take special note of McArdle’s title, and now consider Betteridge’s Law of Headlines, which states: “Any headline that ends in a question mark can be answered by the word no.” If pie were at all easy, wouldn’t Americans save it? Of course they would; but Betteridge, McArdle, and Sagan say they will not.

Pie is not easy. But then, nothing worthwhile ever is.

2021-and-done

When the year fails to acquit itself well, it is my self-appointed duty to compensate with witticisms and clever observations. (Previously.)

  • Not everything in 2020 was bad.

    Not everything in 2021 will be good.

    Also, it's foolishness to assign credit or blame for events to the calendar.

    Still happy to have 2020 behind us. Happy new year!

  • Continue reading “2021-and-done”

The Santa Corps

You better not pout
You better not cry
You better not shout
I’m telling you why:
The Santa Corps is coming to town

It’s made up of moms
And also of dads
Uncles, aunts, siblings
Students and grads
The Santa Corps is coming to town

It numbers in the billions
With no centralized control
Its geographic center
Is of course at the North Pole

No toy-making elves
No reindeer-drawn sleigh
There’s no need for magic
It just seems that way
The Santa Corps is coming to town

(Previously.)

Trying hard, and failing, not to make a 2020 hindsight joke

Seldom has a year been more unloved
Or with such relish on the trash-heap shoved.
(Previously.)

Artlessness of the deal

Just under the wire this year.

The sentiment in this song may or may not be true, but that it can at least be seriously entertained is a soothing balm after the one I had to write four years ago.

He better watch out
He better not cry
He better not pout
I’m telling you why:
Donald Trump is going to jail

He’s making a list
Of who’s done him wrong
The DA’s indictment’s
Equally long
Donald Trump is going to jail

He laundered mobster money
Paid bribes, committed fraud
Grabbed Justice by the pussy like
She was just another broad

He might have had lots
Of friends in the joint
But all of his pardons mean
He’s disappoint
Donald Trump is going to jail.

(Previously.)