Thursday, October 6, 2011

The Lawn Mower Algorithm

While mowing the lawn the other day, I couldn't help but think about "what is the most efficient route I can take to mow my lawn".  It occurred to me that this wasn't the first time I had this thought.

As I thought about it, I decided that the most efficient route would be the one that maximizes mowing time and minimizes going over the same spots twice.  Sharp turns (especially 180 degree turns) will lead to down time.  But there is a balance there with going over the same areas more once.  Trees and landscaping make it even more interesting.

So, I think the problem is actually an interesting one but I've never remembered to look it up when I get inside...until now!

For your reading pleasure, I present to you a thorough discussion of "the lawn mower algorithm"

If that wasn't enough, I somehow found myself on this related topic as well:
Mow your yard with lasers!

And finally, to the single image that made it all worth while: 
 I love the internet.

The Ultimate TV Experience

I just saw the following from Time Warner Cable:

Supposedly, they will offer an iPad app which lets you browse the menu of channels without interrupting the program being shown on your main screen (i.e. the tv).  This is close, but not exactly, the user experience I've always wanted for my TV.

What I've always wanted is the ability to browse (or search) on my phone, preview the content right there, and be able to project that channel to the TV with a swiping motion.
Sort of like picture-in-picture only the second picture is actually on my device.

Anyway, this app is the closest I've seen so far, so kudos to Time Warner...I'll have to check this one out (if they ever release an Android version).

Friday, April 15, 2011

A Tip for Running Apache Server on Windows 7

You must run htpasswd as 'Administrator'.

This is also required for Apache-based derivitives like the IBM HTTP Server.

Wednesday, April 13, 2011

Shipping API Jars Without The Associated JavaDoc: An Antipattern

I just tried out the RSA 8.0.2 release and tried to create a new SCA Project. To my surprise, I was missing any and all documentation for the* packages. What's the point of including SCA support if you don't include the corresponding JavaDoc?

Here is the solution:
  1. Highlight one of the imports
  2. Control-click / press f3 to go to the declaration
  3. Click 'Link with Editor' on the Package Explorer view
  4. Right-click->Properties / press Alt+Enter on the parent jar (
  5. Select 'Javadoc Location'
  6. Set the Javadoc URL to
  7. Validate the location to be sure you didn't accidentally include index.html at the end (which I always screw up)

Possible Eclipse Bug

Wondering if this is an Eclipse Bug or not...

When I try using the annotation on my class, I get a compile error because the package is not imported on my project.

Hovering over the attribute gives me long list of Service classes:
  • javax.mail.Service
  • ...
and the following message:
"Attribute information for this '@Service' instance:
Unspecified attributes:
interfaces, value"

What does that even mean?
What's odd is that Ctrl+1 gives me the proper quickfix: to import

Whats really odd is that, now that the Service annotation class is resolved and the error is gone, hovering over it still gives me the original message!

Tuesday, February 15, 2011

Man vs. Machine

I must admit that I've gotten quite caught up in the IBM Watson Jeopardy challenge. It makes me proud to work for such an amazing company. That said, and not to take anything away from Watson or the researchers that built it, I can't help thinking that the match-up isn't 100% are a couple reasons:

1. The machine is simply faster on the trigger.
I think Jennings (and probably Bruce Rutter too, funny how everyone knows Jennings but at least so far Rutter has twice his score) knew a lot of those answers...its just that Watson could consistently beat them to a buzzer (though the guys did win on a couple that Watson clearly knew the answer to as well). I've actually read that buzzing too early creates a short time penalty, so that makes it even tougher on the humans.
What would be really interesting to me is if they would compensate for human reaction time, for instance, by accepting all buzzers within the first 300-400ms or so and then randomly select one of the buzzers that made that "instantaneous" benchmark.

2. Two humans, one computer.
Assuming there are a certain class of questions that are particularly difficult for the computer and easier for humans (perhaps a large assumption?), it isn't totally fair that there are two human contestants that end up competing with each other for these scraps. Maybe it would be better if the competition was just head-to-head? It kind of reminds me of a 3rd party candidate taking more votes from one of the mainstream candidates than the other. Does that make Rutter the Teddy Roosevelt to Ken Jennings' William Howard Taft?(surprised I couldn't find a better example). Anyway, don't blame me, I voted for Kodos.

PS. After Watson finishes these guys off tomorrow (at this point I think that losing overall would be a pretty huge choke job), wouldn't it be interesting to see Watson compete against other some kinda of corporate jeopardy tournament? Like, maybe if Jeopardy would run a special machine-contestant day in a year or so?