Monday, November 9, 2009

Direct Democracy

I think this is a great idea, to allow the US population to vote, directly, on whether a bill should become law, instead of the indirect process we now use, trusting our congresspeople to vote on our behalf.

Everyone in the US knows how lobbyists, hired by corporations or other groups with lots of money, sway how our congresspeople vote by simply bribing them. It's a disgusting situation, yet, somehow we all complacently accept it as normal. I'm sure our founding fathers had no idea this would happen nor how much technology would advance.

Congress does other things, of course, like holding public hearings on important topics, etc., so I don't think it'll really be as simple as outright abolishing it.

Unfortunately it seems very unlikely that the US will ever switch to a direct democracy. But I for one would sure love to see it.

Saturday, October 24, 2009

Discrimination against kids

A few weeks back we went camping with the kids; it was great fun! I did tons of camping as a kid and I've been eagerly looking forward to our kids being old enough to go. They finally are.

My wife found a rather luxurious campground: it had indoor pools, jacuzzi, outdoor pools, places to buy food, drinks, firewood, etc. It was generally very kid friendly -- lots of activities for kids, play room, etc. We were quite spoiled and we loved it.

However, there was a strict rule that kids are not allowed in the jacuzzi nor the sauna. When we pulled out inflatable pool toys, we were politely informed that they, too, are not allowed.

Now, don't get me wrong: these rules are common these days. Many places with pools and jacuzzis and saunas will have the same rules. These rules didn't exist when I was a kid, but now they are commonplace and accepted as normal. My kids just accepted them, in stride, as kids will do.

But I am bothered: this is quite simply discrimination against kids.

I understand why the rules are there. Thanks to our overly litigious society, if kids get hurt in the pool or overheat in the jacuzzi, the parents sue the campground rather than accept their own negligence. And unfortunately, they often win, or, settle out of court. This is not unlike McDonalds being sued for making coffee that's too hot.

At the same time, we also have become a "safety above all" society, for better or worse. We must wear helmets when we bike, elbow pads and knee pads when we get on our roller blades, seat belts and car seats when we go driving, life preservers if we get anywhere near water. Kids barely venture out into their front yard, let alone out around the neighborhood, for the [overblown] fear that something bad could happen. Examples abound.

As a parent I fully appreciate the dangers of water. In fact water is a terrifying combination: it is at once incredibly fun yet also deadly. To a child who can't yet swim, a pool is literally a potential death trap, and it's the parent's job to keep their kids safe.

Thus, the insurance costs go up, likely by quite a bit, if the campground allows such "unsafe" activities, and so they choose to discriminate against kids and save some money.

There was a time when slavery was common place, but that certainly didn't make it right. Just because kid discrimination has now become widely accepted does not make it right. If you encounter discrimination against your kids when you travel, please write up a review making this clear so future families can plan accordingly.

Wednesday, September 30, 2009

A better grass?

I came across this article about a newly developed grass that does not require the normal intense life-support we all have come to assume is "normal".

You don't have to water it (after the initial seeding), nor apply pesticides nor fertilizer. And it only requires mowing once per month instead of the typical once per week schedule for life-support grass. It was designed to simply survive, naturally, in our challenging northeast climate.

I've always felt that such a grass must exist, but that the existing grass seed companies would not be interested in pursuing it. See, if the grass simply takes care of itself, we all will buy much less grass seed over time. The lawn care service industry will see much less business, mowing our lawns monthly instead of weekly. Manufacturers of pesticides and fertilizers and lawn care equipment will see less demand, etc. It's quite clearly not in the interest of the lawn care industry to pursue nor allow such innovation.

I sure hope this grass is successful, but the pessimist in me expects that in a few years time, either this company will have been sued out of existence, or the rights to this grass will have been purchased for a princely sum, and then promptly shelved, by one of the big established players in the grass seed industry.

For better or worse, capitalism favors waste in mature markets.

Thursday, September 24, 2009

Today, on my morning run, I saw a student walking, late for the bus. The bus saw her walking, way down the road and so stopped and waited for probably two minutes or so for her to catch up and get on.

This might seem like only reasonable behavior, on the bus driver's part. S/he was being nice, right?

As crazy as it sounds, while it was a nice thing to do, I don't think the bus should have stopped. Here's why.

It sends the message that one student's inability to be on time is allowed to cut into the time the rest of the students get at school. The needs of the one outweigh the needs of the many (thank you Spock). It's only two minutes, but if this happens a few times on the route, day in and day out, that adds up to net/net less time at school for all the kids.

The rest of the students, who made the bus on time, probably having rushed through their morning at home to do so, pay the price for those students who can't make the bus on time. They will conclude that they, too, can be a bit late and the bus will wait. Why bother rushing to be on time? Rather than being taught that they should try hard to make the bus on time, to take responsibility for not making others wait, they are taught the reverse.

Finally, seeing the bigger picture, this teaches kids that the world will stop and wait for them. Make up for their faults. Be forgiving. That you need not try very hard for things because the rest of the world will compensate. You need not take responsibility. It ties right into the dangerous sense of entitlement that many kids seem to have now. For better or worse, the world simply is not like that once you grow up.

She should have simply missed the bus and learned a good lesson.

Saturday, September 5, 2009

Fun questions

Here are two fun questions I've [temporarily] stumped my kids on:
  • How can gravity make something go up?
  • How can the moon get you wet?

Tuesday, September 1, 2009

Spell correction

Spell correction is a challenging feature for search engines. Unfortunately, it's also crucial: mis-spelling is rampant when users run searches. In part this is because we all can't remember how to spell, and that's no wonder: the number of English words today is 5X what it was in Shakespeare's time! But it's also because we are simply in a hurry, or, lazy, and make many typos.

I rely on aspell when I'm using emacs. Modern web browsers and word processors check the spelling of all text you enter. Web-side search engines have excellent spell correction; in fact, I no longer bother to correct my typos when entering a search. I've often wondered whether such "crutches" of our modern world are in fact weakening our minds and perhaps causing our language to further evolve? For example, I wonder how Microsoft Word's often wrong (in my experience) grammar checker has crimped "modern" writing.

My Chemistry teacher in high school refused to allow us to use calculators during our tests, for fear that we would lose our ability to do math with only basic tools (paper, pencil, brain, hands). My Physics teacher did the opposite, for the reverse fear that the distraction of doing basic math would take precious time and thought away from actually thinking about how to solve the problems. Who's right?

Google clearly sets the gold standard for respelling, that any search engine is now required to live up to. If you don't match that high bar, users are automatically disappointed. And you really don't want to disappoint your users: it's nearly impossible to get them to try out your new application, and, they often don't give second chances.

For most approaches to spell correction, the more data you throw at them the better they perform. If you have lots of queries coming in, you can use that as your sole source. Google of course has tons of queries to tap into. If you are less fortunate, you can use your index/documents as your source. Both of these approaches assume most people know how to spell well! The assumption seems to hold, for now, but I have to wonder, as we all lean on this crutch and become worse at spelling with time, won't this eventually undermine Google's approach? No worries; Google will adapt. This is not unlike investing in index funds: that approach only works well if relatively few people do it.

Lucene's basic spellchecker package, under contrib, which requires you to provide a Dictionary of "known words", allows you to derive these words from your search index. It has some limitations: it can only do context-free correction (one word at once, independent of all other words in the query); it doesn't take word frequency in the index into account when deriving the index (so if a typo gets into your index, which can easily happen, you could end up suggesting that typo!); etc. But it does provide a pluggable distance measure for picking the best candidate. It's a good start.

One particularly sneaky feature to get right is spell correction in the context of entitlements; my post this morning on Lucene's user list raises this problem in a real use case (single index to search multiple user's emails). Entitlements means restricting access for certain users to certain documents. For example, you could have a large search index containing all documents from your large intranet, but because of security on the intranet, only certain users are allowed to access certain documents.

Lucene makes it easy to implement entitlements during searching, by using static (based solely on what's indexed) or dynamic (based on some "live" external source at search time) filtering.

However, properly doing spell correction in the presence of entitlements is dangerous. If you build a global lexicon based on your index, that lexicon can easily "bleed" entitlements when there are terms that only occur in documents from one entitlement class. This might be acceptable for context-free spell correction, but if your spell correction has context (can suggest whole phrases at a time) you could easily bleed a very dangerous phrase (eg, "Bob was fired") by accident.

So, you might choose to splinter your spell correction dictionary by user class, but that could result in far too little data per user class. I'm not sure how to solve it, well; it's a challenging problem.

I hope I haven't mis-spelled any words here!

Friday, August 28, 2009

The best way to learn is to teach

They say the best way to learn something is to teach it. Well, I say writing a book sure counts as teaching because writing the 2nd edition of Lucene in Action sure has taught me all sorts of juicy details about Lucene, far more than I would have learned on my own.

I can also say that writing a book about an active open-source project is very demanding. I try to keep the manuscript current, as changes are happening to Lucene, but then more than once I've been burned by keeping it just a little too current, only to see that the community up and changed its mind on something I had already folded into the book's manuscript and source code!

Finally, as Lucene is getting very close to releasing 2.9 I'm now scrambling to fix the loooong tail of little things all throughout the book. Even once I finish that, it's several more months for a deep technical review, Manning's production process, etc. I'm looking forward to finishing!

Sunday, August 23, 2009

A kid's mind

I just love how kids think. It's so carefree and unrestrained by all the silly "limitations" we adults have learned with time.

Here's an example: we just finished a vacation with cousins (my kids' cousins). They were all in the car yesterday, eagerly discussing Halloween and who's going to wear what costume. But then they all realized and lamented that in fact they would not be together for Halloween. So, immediately, my son said "Dad, can we fly to California for Halloween?".

It just tickled me pink! See, we live in Boston, MA, so flying to California is easily a 9 hr affair, one way, "door to door". Not to mention, expensive! But my son's thinking of course wasn't restrained by such silly things.

As adults the idea would never be allowed to cross our mind. Somewhere, deep in our brains, is a group of neurons that quickly and mercilessly kills off such thoughts before we can even think them. But there's no such limitation, yet, with a kid's mind.

If you spend even a small amount of time with any child, you'll see many examples of this unrestrained thinking, and it's delightfully refreshing. We all should strive not to grow up. It's easily the best thing you could do for yourself!

On bottled water

The bottled water industry is truly silly.

It's an enormous money-maker, a $20B industry in the US alone. You're buying a product that's hundreds of times more expensive than tap water. Yet, often the bottled water simply comes from a municipal source anyway. Furthermore, it's easily less safe than your tap water. See, the EPA has tougher regulations for tap water than the FDA has for bottled water. For example, the FDA allows some contamination of E Coli, and does not require testing for known parasites such as Cryptosporidium or Giardia Lamblia. Likely your bottled water does not contain Fluoride as well.

Not to mention the insane consumption of oil required to schlepp around all this bottled water and then again to discard the empty plastic bottles. You should of course recycle them, but precious few of us actually do and so they fill up landfill, a "gift" from us to our future generations. Or perhaps your empty bottles end up in the Great Pacific Garbage Patch.

And as if all of this weren't already reason enough to avoid bottled water, there is the curious problem of the chemicals in plastic, such as Bisphenol A (BPA), leaching into the water over time. Previously, it was believed that these chemicals didn't easily leach unless the plastic was hot (this is why you're not suposed to put plastic containers in the microwave or dishwasher).

However, this delightful study showed that simply drinking bottled water increased BPA in urine by 2/3rds. Perhaps bottled water should include a clear "bottled on" date so you can at least roughly gauge how much BPA you're about to drink.

Plastic is clearly an incredibly useful material, and I'm sure we'll eventually sort out the problems of the various chemicals that leach from it. In the meantime, I simply play it safe by avoiding plastic touching our food/drink, when practical. For example, we only put glass ware in the microwave, and when we need to carry water on-the-go, we always use a Klean Kanteen. In fact we now have many Klean Kanteens: in the car, in the stroller, next to the kid's beds and in our home offices, on the dining room table, etc.

Saturday, August 22, 2009

Hurricane Bill is coming!

I find myself, this quiet Saturday morning, in Falmouth MA, staring down the barrel of Hurricane Bill! Seriously, it's headed straight for us, having gained strength last night.

Yet, we're planning to go happily to the beach this morning, anyway. Why play chicken with a hurricane? Because the computer models at the National Weather Service insist that Bill will take a turn northward, sometime very soon, and not in fact touch Cape Cod at all (though it is projected to make landfall in Nova Scotia Sunday PM).

We place alot of confidence in our computer models these days, and I sure hope they're right.

I was in Falmouth for Hurricane Bob in 1991 and it was stunning. Have you ever tried to stand up when 100 mph sustained winds are blowing at you? It's quite an experience, and the resulting damage was unreal.

Thursday, August 13, 2009

Anticipation is half the fun

I've found that for most people, but especially kids, the anticipation leading up to something is a sizable part of the fun. If you have an exciting vacation coming up, take every chance to remind your kids that it's coming, what the plans are, etc. If you don't, they've missed out on half the fun!

I'm also convinced that this is why so many people can go to the Disney parks. The lines are amazingly long, and the actual rides amazingly short. It's the anticipation of going on a ride that keeps you happy.

Tuesday, August 4, 2009

Life support grass

Seriously, could we possibly have picked a worse plant for our yards than "grass", even if we tried?

I mean the stuff is so sickly, it has no prayer of living on its own in our local climate. It requires massive amounts of life support just to barely eek out an existence.

I'll admit, with all the life support, grass can be truly beautiful. But the price we pay to reach that beauty is ridiculous.

We dump hundreds of gallons of water on the stuff, every night, using sprinkler systems now built standard into the ground for new homes. This of course leaches all nutrients from the soil. Worse, grass is nitrogen-leaching: it removes nitrogen from the soil. So we must dump on loads of fertilizer to put it back.

Being on such luxurious life support, the grass grows like it's in a jungle, and so we are forced to mow it, at least once per week. While leaving those clippings in place would make great natural fertilizer (after all, this is where all the fertilizer went!), it's not pretty so we truck the clippings away and dump them somewhere else.

Of course, lots of other plants thrive, too, even better than grass. We like to call them "weeds", since they are not grass. And so we must dump toxins over the yard to kill them. We dump separate toxins to kill all sorts of bugs. Sometimes, from too much water, a fungus develops, so we dump something else on to kill that.

All this stuff we dump on the yard likely endangers our kids, us, and our pets, but somehow we don't seem to care. It also kills off the worms that'd naturally aerate the soil, and so we must do our own forced mechanical aeration. It messes up the pH balance, so we dump yet more stuff on (lime, sulphur) to fix that.

In fall, when the leaves drop on the weak grass, we must quickly rake or blow them off, because the grass dies off quickly if it's left covered by leaves.

After winter, which the grass barely survives, some of it has died off and turned brown. This is fully natural, and that dead grass would normally serve as nature's fertilizer, yet we don't like the color, so we dethatch and reseed.

These practices don't end with grass, of course. We truck in loads of mulch, the lipstick of modern lawn care, each year. We spray all sorts of toxins on the trees, the bushes, etc. Terminex shows up, spraying all sorts of other toxins. People with blowers show up and blow every last little thing off the asphault of your driveway.

This whole ritual is now commonplace. It's assumed, accepted and expected practice. If you don't subscribe to the life-support grass movement, people think something is wrong with you. How did we get ourselves into such a mess?

Can't we, instead, find a plant that has no trouble surviving in our natural climate, with zero life support? Why did we all fall in love with this sickly life support grass, anyway?

For example, crabgrass thrives. It's very hardy, grows with no additional watering, takes care of seeding by itself while grass never succeeds in seeding itself (presumably it's been selected and bred not to). Clover is another example, and has the advantage of being nitrogen fixing (the exact opposite of grass): it extracts nitrogren from the air and puts it back into the soil. This is why it's such a dark green even without fertilizer.

Surely we can do better.