Real-time Java

I finished (I think) the talk I'm going to give at the radar conference in Oz. The talk deals with creating the downstream data processing algorithm to assemble adaptively scanned phased array radar data. The talk is online (Powerpoint slides) now.

What I didn't say on the slides (doesn't belong in a scientific presentation) is that the program is written in pure Java. Real-time data processing in Java? Well, the time's here.

A few months ago, I reimplemented one of the simpler severe weather algorithms (the single-radar VIL algorithm if you are interested) in Java just so that we could do a time comparision against the heavily optimized C++ version that is running in real-time. The Java program was (wait for it ...) 5% faster. And this was without any serious effort at performance tuning or optimization. Of course, I knew going in Java's performance bottlenecks, so the program dealt with built-in arrays instead of the Collections classes. The C++ version uses STL's vector. Inspite of having to use built-in arrays, the Java program was significantly easier to write. But you knew that already.

This algorithm is the first real-time one (in WDSS-II) that's been written in Java. The first of many, I hope.

Book swap instead of presents at a birthday party

The New York Times has an article talking about parents who ask for money for charities instead of birthday presents at their kids' parties . The article quotes Miss Manners suggesting that it's bad to spend your guests' money on your charities. I would tend to agree.

There's a better way to avoid excess.

The 5-year old was born on the same day as one of his classmates. The two kids wanted to share a pool party even though both sets of parents offered to give them separate parties. (Count me a proud father).

Then, they agreed to my wife's suggestion of being less extravagant with gifts. They asked their friends to each bring a book. At the party, we had the kids sit in a circle, sing "Happy Birthday", and pass the book they'd brought along to the person to their left. Thus, every kid left the party with a book. We bought M. (the other kid) a birthday present and M's parents bought S. one.

The parents didn't feel bad, because they had brought something: just not for the birthday kid. And we didn't buy goodie bags (each guest left with a book). The birthday kids got to feel special because they got a nicely wrapped birthday present, but didn't end up with 24 articles destined to be played with once and discarded. Only one kid (a 2-yr old sibling of one of the 5-yr old guests) cried because he wanted to keep the book he came with. Based on that, the idea won't work for 3-yr old parties, but for 5-year olds and older, a book swap is a very workable solution.

Mr. Modest

A fellow in my class in Washington DC this week showed up on Tuesday wearing a University of Texas Longhorns shirt. When I teased him about it (Oklahoma and Texas have a long-standing rivalry), he offered that his affection for Texas was genuine.  He said he'd represented Texas in Track.

Today, when I mentioned that I was going to Cairns, Australia next week (for a radar conference), he piped up that he'd been to Australia three times.

"Three times?", I asked, "how come?"

Turns out he was a world-class athlete, participating in several international sporting events. He even ran in the 1984 Olympics.

Feel good mush

I finished reading the latest Harry Potter book (Deathly Hallows) yesterday. This book is poorly plotted and badly imagined. But then, none of the previous ones in the series is any good.

I read the first book when it came out just to know what all the hullabaloo was about. The point system at Hogwarts and the rules of Quidditch were both incredibly innumerate. And since these were both major components of the plot, it was obvious that the author could not create a realistic world. Unlike, say, Tolkien in the Middle Earth books.

It's surprising to me that the Harry Potter books are as successful as they are. They're feel-good mush. But then, I did read every single one of them. So, what's up with that?

Smokies not up to par

We spent the weekend in Smoky Mountain National Park.  I've been there earlier -- about 10 years ago when we stopped here enroute from Ohio to Florida. That was in winter and the park seemed gorgeous.

Somehow, the park didn't impress this time. Maybe it's just that it's summer after a season of patchy rainfall. But, it may be that I've seen more of the country now. Since that winter visit to the Smokies, I've been to Big Bend and Yellowstone (my top two). I also think the Ouachita mountains and forest in Oklahoma and Arkansas are as beautiful, and not as crowded. There's even a scenic drive that cuts across it.  In other words, maybe my standards are higher.

New feature: Interesting reads

I've added a new section to my blog, to point to interesting things I've read recently.

For example, today's list includes an article discussing whether we (in developed countries) contribute to the endemic problem of child labor in third-world countries. It comes to the surprising conclusion that the way to reduce child labor is to actually increase trade -- the richer a society gets, the less its children work. In other words, child labor is driven not by supply (of employment opportunities) but by demand.

The other article in the list points to a paper on how the English Channel separated Britain from continental Europe -- an ice age torrent , apparently. Explains the Dover cliffs.

If you are reading my blog through a RSS reader, you can subscribe to the article feed too. If you are reading the blog by visiting the web page, you can see the article links to the right.

But ... if you are reading the blog by visiting it, you should give RSS readers a try. They're great. I use Google Reader, but there are others, including desktop clients. In fact, the article links are generated automatically by me sharing selected articles from my feed. Unfortunately, I've not figured how to add comments to articles I share. Until then, you have to read the articles without my gloss.

Beginnings of two algorithms

A quick glimpse into my work week:

(1) A bunch of us here at the lab are talking to several groups of researchers and forecasters in the Carolinas. They are interested in an automated algorithm to identify and track sea breezes because sea breezes often lead to late-afternoon thunderstorms. So, I pulled together a dataset to see if an automated algorithm would be feasible ... Here's my brief (Powerpoint)

In the picture, the wing-like structures parallel to the coast are the seabreeze extracted from radar reflectivity images. Unfortunately, the technique also picks up the strong gradients at the land-sea boundary right at the coast line and a storm cell north-east of the radar -- these will have to be removed in the final algorithm.

(2) An undergraduate student is working with me this summer. We are trying to evaluate whether some types of tornadic storms are easier or more difficult to forecast than others. In order to do that, we need to automatically determine storm type. I wrote the clustering algorithm and trained the decision tree to do that. Here's one of Eric's talks (also Powerpoint) on the subject.

In the picture, "S" is a supercell and "L" is a convective line. The other two categories we used were "P" for pulse storms and "n" for non-organized.

Both of these ideas are of course in the first stages of a long process before they become real-time routine algorithms (if they ever do).

Asking for trouble

So, a Hindu "chaplain" led a prayer in the Senate and got disrupted for it. Senator Harry Reid, who had invited the speaker, introduced him and was careful enough of potential objections to invoke Gandhi as the prototypical Hindu:
I think it speaks well of our country that someone representing a faith of about a billion people comes here and can speak in communication with our Heavenly Father regarding peace. I am grateful he is here. I am thankful he was able to offer this prayer of peace in the Capitol. I say to everyone concerned, think of Gandhi. If you have a problem in the world, think what this great man has done to bring peace and nonviolence to a troubled world.
But maybe he shouldn't have bothered. Hindus don't have chaplains who give sermons; it's much more of a ritualistic faith. So, the whole idea of a religious guy leading an extemporaneous prayer simply doesn't really carry over.

Organized religion is so jingoistic that inviting a non-Christian leader to lead prayers was simply asking for trouble. I don't think this jingoism is limited to Christian zealots, as some would have it. Christian prayers in a Muslim country would bring out protests that are even more loud.

The two backstories (Reid's and Zed's) though do bring up a few inconvenient thoughts:
  1. So Reid gave rides to Indian graduate students when he was in college.
    I lived off campus. I was married. I would drive up that hill to the campus, and walking every day were students. They were Indians, coming from India to the United States to study. Utah State specialized in engineering and agriculture. These young men came from India to study at Utah State University. I would give them rides. I did that for 2 years, put as many in the car as would fit.
    A Mormon guy with a bunch of heathens in his car? Did Reid take up the opportunity to proselytize?
  2. The students gave him an ivory elephant that he still has.
    I don't remember all they gave me, but I do remember one item. It is in my office in the Capitol. That was many years ago. We have had five children since then and lots of grandchildren. But it was a little statue of Gandhi, hand carved. It is ivory.
    Was ivory trading legal at the time? How old is Reid anyway?
  3. Zed was asked to deliver his prayer in English exclusively. So, they are more afraid of the English-only crowd than of the Christian-only crowd? Really?

The mathematics of lacing up

My friend the astrophysicist stumbled upon this article about the relative lengths of shoe lace required by various tying methods.

This really scratched an itch I've had for a while. Whenever I tie my shoes -- I use the American standard zigzag -- the loops turn out so long that they brush the floor. I need to do a second loop to prevent that, but the second loop usually loosens up and then I'm afraid I'll trip.

The article is nice enough to show, through either formulae or a light-ray reflection graphic (I don't know about you, but I read images much better than I read math formulae) that the American uses the least amount of lace. Quite ironic that the oh-so-green Europeans use more lace (although as the graphic shows, not that much more). But the difference between the shoe-shop technique and the other two is quite substantial.

So, I relaced my sneakers to use the shoe-shop technique. And wouldn't you know it? Only one loop required.

Freeing an innocent man

I've been playing bridge for a couple of months now and my sort-of-regular bridge partner is a public defender. Yesterday (we tied for third, by the way), I learned that she did the habeas corpus for the man whose death penalty case forms the basis of John Grisham's book about injustice in a small town in Oklahoma. She's not the one who handled the death penalty appeal ("the one who gets all the TV deals") but she's the one who set his exoneration into motion.

Would be good to have a job where the capacity to do good is so immediate. Although severe weather algorithms and improved forecasts do have an impact on the public, the effect is not that direct.

I've reserved the book at my public library.

All time is digital

I no longer wear a watch these days. After all, my computer at work has a clock; my car has one and my cell phone does too. There's no need to weigh my wrist down with one as well. Today, I was stuck all day in a "workshop". No work is getting done, of course. More of a gripe session. But I digress. The last speaker was on, and I thought he was done, so I'd packed up my laptop, but he kept going on and on. And I badly needed to see the time -- there was a "honey-do" I needed to do -- but I'd left my cell phone in my office and the meeting room, as far as I could see, had no clock. What was this, a casino?

So I did what I always do in such situations. I tried to sneak a peek at the wrist of someone sitting near me.

Only one fellow was wearing a watch. And his was digital, so I couldn't read the time.  Next time, I need to sit beside older fogeys.


With my in-laws in town, I've been watching a fewTamil movies in the last couple of weeks. The movies are a lot more slick than they were ten years ago, but the story lines and implicit assumptions still make me cringe.

Take for example, this rather formulaic, but well-executed, cops-and-gangsters movie that we watched.

In one scene, the cop and his girlfriend are driving to Pondicherry, a city a couple hundred kilometers south of Madras (Chennai). Which is simply the excuse for a set of scenes set along the gorgeous Coramandel coast. In the entire scene, the jeep they drive is right on the median. Even in the movies, Indian drivers don't drive in their lane! Even if the driver is a cop.

Or maybe especially if he is a cop, because normal rules didn't seem to apply to him. In an earlier scene, the policeman-hero is lighting a cigarette (it seems that every male figure in the movie smokes -- every single one of them) when he sees the lady-lead and asks her where she lives. Where she lives. She doesn't tell him. A few scenes later, she figures out that he's a policeman, so she apologizes for not answering his question. Apologizes. Somehow, being a cop makes it ok to ask a member of the public anything.

And of course, just as American sitcoms feature out-of-shape men and hot women, so do the Tamil movies. Except that in the very color and class conscious Indian society, the not-so-desirable men are from the "lower classes" while the very-desirable woman is light-skinned, has long hair and went to IIT Madras. I'm not kidding. IIT-M. That's one of the things that makes her hot.