Thursday, January 26, 2006

Using Code Metrics for Targeted Code Refactoring

I had a chance to attend Andrew Glover's Using Code Metrics for Targeted Code Refactoring, at MADJUG last night.

Having very little exposure to source metrics, the highlights for me were the demos of using JavaNCSS, PMD, and the Eclipse Metrics Plugin. All very cool - my plan is to check out PMD. It seemed to provide the functionality that I'd be looking for initially, so we'll see what it thinks of some of this code I've been writing lately.

Other than the tools, the talk was largely centured on Andrew's favorite metric: Cyclomatic Complexity. He ran some ridiculous code through the aforementioned tools to produce some reports illustrating just how outrageous it was. More importantly, he did a very good job of illustrating what "outrageous" really meant: hard to test, hard to maintain, and just plain painful to read. More on his thoughts here.

The topic also very much reminded me of a post from Venkat last week.

Monday, January 16, 2006

A hole through the Earth

Subtitled (by him) "Another stupid application for Google Maps...", here the age old question: "if I dug a hole straight through the earth, where would I come out" finally gets a better interface.

Thanks to Aunt Leslie for pointing this out to me last weekend.

Also, on my search for the URL, I came across this link to the site. I really hope this isn't accurate.
"A National Geographic study concluded that 11% of Americans 18-24 can't find the US on an unmarked map."

Wednesday, January 11, 2006

My Directions/Mapping Software Wishlist

Maybe these are already out there? Definitely let me know if you've seen them.

1. The ability to generate more general directions.
When I say I want directions from "Madison, WI" to "Denver, CO": I want the directions to start out on the interstate/hwy leaving Madison and end up on the interstate/hwy entering Denver.

By not providing a specific starting address, I have indicated that I don't need help getting out of Madison or into Denver. I don't want the directions I print to be comprised of 7 steps to get me out of Madison and 11 steps to get me into Denver with just a few in between.

With a little extra effort on my part I can take care of this by entering my starting point as some point outside Madison but that's not always either. For example entering: "US-151, Madison, WI" (my Madison exit route to Denver), I still am presented with directions that start downtown. I could find some intersection outside of town... but that's a bit too much effort.

How you ask can the intelligence to be added to know which Hwy is specific enough for me entering Denver? ... I'm not really sure but I think it can be reasonably accomplished. Maybe it already has been and I just need the correct format for entry?

2. The ability to modify routes.
You ask for directions from A->B. The suggested route is:
1. start at A.
2. take a right on Oak St.
3. take a left on Main St.
4. take a right on Broadway Dr.
5. arrive at B.

For whatever reason (I'll give some below) you want a modified/alternate route.

In my head, this is accomplished by me grabbing a point of the route (the line on the page) and dragging it somewhere. Effectively, I think behind the scenes my request has changed to: Directions from A->X->B. Where 'X' is the point that I just dragged to. With enough dragging, I could effectively eliminate 'Main St' from my route (or minimize it anyway).

An example:
If you are coming to my house, this is the easiest route. Notice that you are proceeding on Hwy 151 to exit on CR-C.

If you are leaving my house, this is the easiest route. Notice here that you are not using CR-C - because the entrance ramp is closed.

It's true: these are the best routes for me to take to get to and from my house. but when you come to visit me, I want to give you a route that you can use in both directions. That way, if you somehow manage to find my place: retracing your steps later won't be so bad.

Anyway, that's one example. There are many others: you want a different route because you know of bad traffic or construction, you need to stop at the grocery store on the way, or maybe the human user can just plain determine that the route being presented is incorrect or inefficient.

Anyone seen this stuff?

Thursday, January 05, 2006

Open Source: It's the Law

Wisconsin governor Jim Doyle signed a bill recently that "...will require the software of touch-screen voting machines used in elections have its source code opened up to public viewing."

After reading an article on the topic this morning (and some of the ensuing discussion there), it seems we're talking about "source that's available", not truly "Open Source" (or at least not by this definition but hey: a step in the right direction for fraud prevention, if nothing else.

Let's just all be thankful we finally can vote by touch screen. I can't wait to tell my grandkids about how not only did I have to walk uphill both ways to school on -30F Wisconsin mornings, but I even had to use a pencil to draw a one inch long line to vote. The humanity!