Friday, March 31, 2006

Movin on up.

The technical blog on blogger is coming to an end. Don't cry: I'm starting a new one over at wordpress. jameshalberg.com has been redirected, but if that isn't working for some reason (sometimes there are some bumps the day after changing) - you can hit the url directly: jameshalberg.wordpress.com.

Hope to see you there!

Wednesday, February 22, 2006

Confusion through documentation

In working with the CEWolf (which I believe stands for: Chart Enabling... um, Wolf) I came across a pretty fundamental question: how do you let the framework know when a chart can be reused vs. when it should be rebuilt?

Conveniently, there is a method that does just that and is located in an extremely logical (and convenient) spot. Now to figure out how to use it... here's the classes javadoc.

1. The method is called "hasExpired" and returns a boolean, which indicates to me that if I return "true": the data "has expired". So, if I want to regenerate I should return true.

2. The javadoc states: "If the data which had already been used for chart rendering is still valid this method should return true". Ok... so, I guess if I want to regenerate I should return false.

3. The javadoc goes on to say: "...there is no guarantee that the dataset production is always avoided if this method returns true". This seems to go along with #2 again: while returning true doesn't guarantee anything, it does mean we'll at least attempt to avoid reproduction: so, if I want to regenerate I should return false.

4. And finally, the javadoc wraps up with: "Returns: true if the data which had been produced with the passed in parameters has expired since its creation, false otherwise". Which seems to basically restate what I was thinking in #1. So, (in my thinking) if I want to regenerate I should return true.

Well, I guess that since #1 and #4 are based on my interpretations while #2 and #3 are blatently telling me that my interpretation is wrong, I am going to start with returning false when I want to regenerate... but I don't like it. and even if return false does regenerate: I'm going to have to test to make sure that's right. Kinda stinks.

Wednesday, February 08, 2006

The IT gravy train must be derailed

"The IT gravy train must be derailed", Robert Cowles (WI State Senator). An article on WTN (Monday) reports on several state senators calling for an audit of state-government IT spending.

Overall I agree with the theme presented in a couple press releases from last Friday: an audit seems like a very healthy thing to do.

Projects run over budget: it happens. Projects run way over budget: sometimes you can't avoid that either. When it's happening consistently though, it's time to take a step back to identify and address what's going wrong.

My only disagreements with the releases are on fairly subtle and somewhat minor points:
  • The fact that a someone is "high paid" (or that something has a high price tag) doesn't mean that they're overpriced and/or not worth it... Doesn't mean they are worth it either, but you need to take a closer look to make that call.

  • Having to spend $1.5 million in the middle of a $47 million project just to make sure you're moving in the right direction is unfortunate. but in all likelihood, if the key players think that it's worthwhile: it's going to save you money in the end.

Tuesday, February 07, 2006

Paging with displaytag

While upgrading a few things (struts, cewolf, etc) on an application we did last year I came across something odd in the implementation of displaytag. We had a custom "paging" solution implemented.

It's not a huge deal but I figured I could stand to be a little more familiar with displaytag anyway so I went ahead and made the changes to rely on more displaytag functionality.

The only thing that I'm really missing is a "display all" function. This I had to kind of hack in - of course, it's easy to "display all": just don't use paging. What I'm missing though is the ability to use paging, but also provide a link to disable/re-enable it. I ended up putting in a bit of a hack solution that I'm not unhappy with... but I'd certainly like to get rid of. Seems like there must be something like this built in that I'm missing?

The joys of changing requirements

A good "Overheard" yesterday.

Sadly, requests like this are not at all infrequent. but while this is certainly a funny post... working with the users instead of just for the users, on their requirements, could probably have avoided the whole dilemna.

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?