The Daily Parker

Politics, Weather, Photography, and the Dog

Home safely

This morning, as Parker and I went for our pre-breakfast walk, we encountered this fluffy girl trotting down the street with no humans in sight:

We manage to corral her in a neighbor's yard, while I posted on Facebook and called animal control. She seemed healthy, well-fed, and accustomed to people and other dogs (though really scared and disoriented). Unfortunately she didn't have a name tag or a phone number.

Happy ending, though. After about 45 minutes her owners came by. They'd been canvassing the neighborhood for her. Apparently she jumped out of the car (saw a squirrel, maybe?) and then couldn't figure out where to go.

So, dog and family were reunited:

Her name is Ella, she's 2, and she's home.

Finally filled up the Prius

I bought my car, a Toyota Prius Prime plug-in hybrid, on December 23rd. It took almost 188 days—more than six months—before I finally put gas in the thing.

Friday morning, on my way to Toronto, I put 34.8 L into the car after driving it 2183.6 km since the dealer delivered her. That's an average efficiency of 1.6 L/100 km, and an operating cost of 1.4¢/km.

For comparison, the last six months I owned my last car, she was getting 13.3 L/100 km and had an operating cost (because of maintenance as well as gas) of 52.9¢/km.

The whole trip to Toronto, during which the car ran almost exclusively on gas instead of battery, used only 73 L of fuel and averaged 4.3 L/100 km.

I think it was a good purchase.

Also, let me just say that adaptive cruise control makes long-distance drives a ton easier.

Significant website update

Today I released a new version of the Inner Drive Technology brochure/demo site. The release includes:

Now that I've got that out of the way, I'm going to start working on the next full version of the site, using (probably) a commercially-available design. The Inner Drive website last got refreshed visually sometime in 2011, or possibly earlier, so it's due.

The last update was 497 days ago, on 9 February 2018. Updating the IDEA took most of the intervening months. (That, and everything else in my life.)

Bach-Barnes tempering

During the A-to-Z challenge, I discussed tempering, which is the art of tuning each note on the scale.

I'm a member of the Apollo Chorus of Chicago, and serve on its board. Every year since 1879, we've performed Händel's Messiah. Given the piece premiered in 1742, modern equal tempering would neither have been an option nor would it have sounded pleasing.

In a conversation yesterday with Dr. Stephen Alltop, our music director, I asked him what tuning we use. He replied:

We use an unequal temperament called Bach-Barnes. Messiah keys range from four sharps to four flats so I tweak the temperament to sound as good as possible in that range of harmonies.

So that's interesting. We perform an 18th-century work with 20th-century instruments using 21st-century tuning.

(We perform it next on December 15th and 16th at Harris Theater in Chicago.)

Z is for Zigeunerlieder

Blogging A to ZToday the Blogging A-to-Z challenge comes to a close, and for the fourth time this year, I have to punt.

Search all you want: music theory really doesn't have any important terms starting with Z. So today, I'm going to talk about one of my favorite vocal works: Brahms' opus 103, "Zigeunerlieder" (Gypsy Songs). I performed three songs from the cycle with the Illinois Music Educators Association All-State Honors Chorus in 1987, 100 years after Brahms wrote it. (Yes, back then I was one of the 256 best high-school age singers in the entire state. I am, right now, blowing on my fingernails.)

Enjoy it. As the score scrolls by, see how much of what I discussed this year you recognize. And enjoy it; it's a cool song cycle.

That's it for the A-to-Z challenge this year. Next April, I'll have a timely topic. Before then, I expect to publish my 7,000th blog entry (probably mid-October), take my 100,000th photograph (probably this month), and live my 18,000th day (almost certainly December 17th).

Thanks for reading!

I hate Scala

"It is no one's right to despise another. It is a hard-won privilege over long experience."—Isaac Asimov, "C-Chute"

For the past three months, I've worked with a programming language called Scala. When I started with it, I thought it would present a challenge to learn, but ultimately it would be worth it. Scala is derived from Java, which in turn is a C-based language. C#, my primary language of the last 18 years, is also a C-based language. 

So I analogized thus: C# : Java :: Spanish : Italian; therefore C# : Scala :: Spanish : Neapolitan Italian. So as with my decent Spanish skills making it relatively easy to navigate Italy, and my decent C# skills making it relatively easy to navigate Java, I expected Scala to be just a dialect I could pick up.

Wow, was I wrong. After three months, I have a better analogy: C# : Scala :: English : Cockney Rhyming Slang. Or perhaps Jive. Or maybe even, C# : Scala :: German : Yiddish. That's right: I submit that Scala is a creole, probably of Java and Haskell.

Let me explain.

Most C-based languages use similar words to express similar concepts. In Java, C#, and other C-based languages, an instance of a class is an object. Classes can have instance and static members. If you have a list of cases to switch between, you switch...case over them. And on and on.

Scala has a thing called a class, a thing called an object, a thing called a case class, and a thing called a match. I'll leave discovering their meanings as an exercise for the reader. Hint: only one of the four works the same way as in the other related languages. In other words, Scala bases itself on one language, but changes so many things that the language is incomprehensible to most people without a lot of study.

Further, though Scala comes from object-oriented Java, and while it can work in an object-oriented fashion with a lot of coercion, fundamentally it's a functional language. Its classes don't know and do things; they just do things.

As in Yiddish or Gullah, while you can see the relationship from the creole back to the dominant language, no deductive process will get you from the dominant to the creole. "Answer the dog," a perfectly valid way to say "pick up the phone" in Cockney (dog <- dog bone <- rhymes with phone), makes no sense to anyone outside the East End. Nor does the phrase "ich hab' in bodereim," which translates directly from Yiddish as "I have (it) in the bathtub," but really means "fuck it." The fact that Yiddish uses the Hebrew alphabet to express a Germanic creole only adds to its incomprehensibility to outsiders.

These are features, not bugs, of Jive, Gullah, Yiddish, and other creoles and slangs. They take words from the dominant language, mix them with a bunch of other languages, and survive in part as a way to distinguish the in-group from the out-group, where the out-group are the larger culture's dominant class.

I submit that Scala fits this profile.

Scala comes from academic computing, and its creator, German computer scientist Martin Odersky, maintains tight control over the language definition. Fast adoption was never his goal; nor, I think, was producing commercial software. He wanted to solve certain programming problems that current computer science thinking worries about. That it elevates a densely mathematical model of software design into commercial development is incidental, but it does increase the barriers to entry into the profession, so...maybe that's also a feature rather than a bug?

Scala isn't a bad language. It has some benefits over other languages. First, Scala encourages you to create immutable objects, meaning once an object has a value, that value can never change. This prevents threading issues, where one part of the program creates an object and another part changes the object such that the first part gets totally confused. Other languages, like C#, require developers to put guardrails around parts of the code to prevent that from happening. If all of your objects are immutable, however, you don't need those guardrails.

A consequence of this, however, is that some really simple operations in C# become excruciating in Scala. Want to create a list of things that change state when they encounter other things? Oh, no, no, no! Changing state is bad! Your two-line snippet that flips a bit on some objects in a list should instead be 12 lines of code (16 if it's readable) that create two copies of every object in your list through a function that operates on the list. I mean, sure, that's one way to do it, I suppose...but it seems more like an interview question with an arbitrary design constraint than a way to solve a real problem.

Second, this same characteristic makes the language very, very scaleable, right out of the box. That is actually the point: "Scala" is a portmanteau of "Scaleable" and "Language," after all. That said, C# is scaleable enough to run XBox, NBC.com, Office Online, and dozens of other sites with millions of concurrent users, so Scala doesn't exactly have a monopoly on this.

Not to mention, Scala gives frustrated Haskell programmers a way to show off their functional-programming and code-golf skills in a commercial environment. Note that this makes life a lot harder for people who didn't come from an academic background, as the code these people write in Scala is just as incomprehensible to newbies as Haskell is to everyone else.

All of this is fine, but I have developed commercial software for 25 years, and rarely have I encountered a mainstream language as ill-suited to the task of producing a working product in a reasonable time frame than this one. Because the problem that I want to solve, as a grizzled veteran of this industry, is how I can do my job effectively. Scala is making that much more difficult than any language I have ever dealt with. (There are a number of other factors in my current role making it difficult to do my job, but that is not the point of this post.)

Maybe I'm just old. Maybe I have thought about software in terms of objects with behavior and data for so long that thinking about it in terms of functions that operate over data just doesn't penetrate. Maybe I've been doing this job long enough to see functional programming as the pendulum swinging back to the 1980s and early 1990s, when the implementationists ruled the day, and not wanting to go back to those dark ages. (That's another post, soon.)

This cri de coeur aside, I'll continue learning Scala, and continue doing my job. I just really, really wish it had fewer barriers to success.

Edited to finish an incomplete sentence.