Sunday, March 21, 2010

Tidbits

2010, A Time Odyssey

I like "2010," as a name for a year. I could never accept "2009"; it always seemed implausible; odd. I felt little temptation to keep writing "2009" on checks when the the year turned over. I welcomed "2010" like an old friend.

I do admit to writing 20010 now and then. "Two thousand and ten."

Well, we're done with that way of describing years. It's "Twenty ten" from here on out. People may have looked at me funny when I said "twenty-oh-eight," but those days are over. And there was a year in between 2008 and 2010, or so some people say.

Mug Shots

My favorite tea mug is the one with the painting by Winslow Homer of a chain of boys, holding hands, running through a yard. It's my favorite because some people say I'm still a little kid, so I sometimes think of myself that way. Even before it was transferred to a mug, it was one of Homer's more dreadful paintings. The boys look like cardboard cutouts. He was wise to focus on seascapes.

My second favorite, when the little-boy mug is in the dishwasher, is the one with a copy of "Irises," by Vincent van Gogh, signed "Vincent" in the corner. It's one of my favorites because my middle name is "Vincent." Close friends call me Vinnie. I have thought of a pet name for this mug: Vincent van Mugh, pronounced to rhyme with "Hugh." I can't think of a good name for my Homer mug.

PHP and Javascript

Two languages I have never known much about have caught my attention lately: PHP and Javascript, the former because of an interest in Drupal, which is written in it, and the latter because I wanted to add some visual effects to an existing web page. As one so often discovers with these scripting languages, they are appalling. No one would think of designing, say, a web browser without consulting experts, but apparently people think all it takes to design a programming language is the ability to write a program. PHP looks like it was designed by a sysadmin who wanted a hack to scriptify his CGI, which, in fact, it was.

Javascript was designed by slightly more knowledgeable people, but it has some of the same problems as PHP, including weird, bug-encouraging scoping rules and insane automatic coercions. (Example: new Boolean(false) creates an object that is automatically coerced to a Boolean — to wit, true.) It's almost impossible to get a type error, at compile time or run time, in either language.

However, Javascript has some unexpected charms, including the totally unexpected treatment of functions as first-class objects. (PHP is a miserable crock in this department.) It's also refreshing that arrays are actually objects. It's as if some refugee from the Java design team who lost battles on these issues sneaked over to work on Javascript and got their way at last.

Cancel the South American Campaign

I received an invitation to a party recently through "Evite," which is supposed to be to "invite" as "email" is to "mail." Unfortunately, in Portuguese and Spanish, "Evite" means "Avoid!" So I don't predict a huge international success for evite.com.

No comments: