Friday, June 27, 2008

New Overdraft "Protection" Rules Proposed in the USA

Last year, when I first opened my US bank account, I was hit with 3 X $35 in overdraft fees. It turned out that most customers are enrolled in a mandatory overdraft protection "service" here. It extends to ATM withdrawals and debit transactions, unlike in Canada where these services only kick in for paper cheques.

So, when I took money out of the ATM and when I spent $5 at Starbucks, I was actually charged these fees. Stupid me for thinking that when there was no money available, the ATM wouldn't give me money (there was still a hold on my first deposit). At the very least, a warning message to the effect of "this transaction will incur a $35 fee" should have been presented. In Canada we get warnings of this sort all the time, e.g. when you use a different banks ATM and they disclose the fee.

I called Bank of America to decline this service recently, just in case. However, you cannot decline this "courtesy service". I doubt many people would view a $40 coffee as a courtesy, especially when they could just choose to use cash. Covering a rent cheque, ok, charging for ATM transactions, not ok.

There is hope -- the Federal Reserve is considering mandatory opt-out availability. Opt-in would be better, but this is a good step.

Wednesday, June 25, 2008

Escape from XML Parsing Hell

I just spent 3 days on the most futile effort of my life, or so it seems at the moment. I'm posting this in the hope that it might help someone who Google's "slow XML java parser" in the future. I've been parsing a lot of XHTML files using Java for a project. However, it was taking about 1s per file, and the time was the same for files of 15k or 150k. Clearly something was wrong. It was also the same for the Xerces SAX parser, the DOM parser, dom4j parser, the Piccolo SAX parser, ... nothing was fast enough. All the benchmarks I could find said it should be on the order of 20ms / file.

Anyway, I brought home my laptop tonight because I was still so frustrated with this stupid slow XML parsing problem and I couldn't put it away. I started running my test program when not connected to the internet, and it generated an exception saying it couldn't connect to So, I was thinking, why the heck is it doing that? I'd already set the parser to be non-validating.

It turns out the parsers all fetch any external DTD that is referenced, even if the parser is non validating! So for every file, the header line was referencing the XHTML DTD and it was downloading it from an external site. So, if you have an abnormally slow XML parser, maybe this is why!

This feature disables that, in case you are ever parsing xhtml in the future and don't care about validation:

xmlReader.setFeature("" , false);

Now it parses 100 trials in 250ms total (down from about 55 seconds). And, I guess my program has stopped retrieving the same XHTML DTD from thousands of times an hour (sorry, it wasn't a DoS attack, I swear).

Phew! What a waste of time. I would never have thought to check for unexpected network connections. Glad my internet wasn't working at home.

3 days of work, help from colleagues, testing various parsers, running on various machines, profiling my code, ... for a 1 line fix that I found by accident. Sometimes I hate computers.

Now, time to move on with my super-cool-top-secret project. :)

Monday, June 23, 2008

Tips Gone Wild!

Here in the USA, I've long been irritated at the prevalence of tipping, and the ever-growing rate (at my last check 20% is considered the default). The tradition has been creeping more and more into everyday life in Canada too -- notice the tip jar at your local Starbucks.

Well, it's gotten to a really crazy level here. I was in the shopping mall the other day and I bought a water at a little convenience kiosk (the type of place that sells snacks, lotto tickets, and cigarettes). And, to my surprise, there was a "Tips appreciated" jar. Tips? For taking my money for the water I got for myself? What's the going rate for that? 20%? What then does the grocery cashier deserve, after handling so many products and packing them up carefully? It just makes no sense.

I can't imagine that the amount of tip money generated by this can make up for the shame of begging for tips when you actually offer no discernible level of customer service.

Macleans has a nice article about this, that I think is right on. Maybe I should send the author a tip.

Thursday, June 19, 2008

Postmark Mystery

I recently received some mail from the US, and the postage was canceled with a skull and crossbones postmark. It looks rather creepy and unusual. I searched online but couldn't find any description of a special canceling stamp being used in Chicago, or any images of this stamp.

Does anyone know what's the story behind this? Is it just a normal thing? I've never seen anything like that before.

Thursday, June 12, 2008

Beautiful Word Clouds

I love working at IBM Research because there are cool things happening all over the place -- reminds me of being at a university lab in many ways. It's really fun, energizing, and, yes, even interns get paid to do it. One of those cool things, although officially a personal project supported by IBM, is Jonathan Feinberg's "Wordle", a beautiful, highly packed, word cloud, launched online today. Think tag clouds but more artistic.

In many ways, this Wordle is very similar to a visualization I have proposed, called an "author fingerprint visualization", in that it has a unique looking structure for each individual dataset and uses free text as input. From talking to Jonathan, however, it seems that his layout is random, and I would want something deterministic and stable, so that the same text would create the same or very similar images each time, like a real fingerprint! Also, Wordle uses simple word counts to determine sizes, whereas we have envisioned a series of measures based more on information content.

But, it's more beautiful than anything I could make, and the website, launched today, is just buzzing with activity. Check it out!

Monday, June 9, 2008

Toronto's Sad Trees

I was again saddened to see the state of the sidewalk trees of Toronto when I visited last week. I don't understand why the City can't plant trees in a way that will give them a fighting chance! It's an eyesore and a complete waste of money to plant a tree in a concrete box inlaid in the sidewalk, with about 20cm by 20cm of space for rainwater to enter. Yet they do it over and over, replacing the dead sticks with new ones that will die in 1 summer. Take this photo as an example. At left, the trees at the new MARS Discovery building were planted in the lawn. The trees along the sidewalk (the same species, I believe) were planted in concrete inlays. They are the same age and are only 5m apart, yet one set thrives and the other is completely dead. For anyone who lives in Toronto, this is predictable. Why it isn't predictable to the city's arborists is a good question I would love to have an answer for. It can't be more economical to use concrete when you know you will have to replace the trees every few years!

Incidentally, here in Cambridge, MA, they plant the trees with narrow metal gratings around the roots, so water can enter. They seem to be doing very well, and don't cause any disruption to the available walking space on the busy sidewalks, while still allowing for rainwater irrigation and some air exchange in the soil.
Posted by Picasa