Monday, September 22, 2008

Product Owner Responsibility

This article posted on Infoq talks about the problems faced by a SCRUM/XP team and unfortunately, it all sounds too familiar.

One of the biggest problems facing the agile community is convincing the potential customer or product owner to take responsibility for their actions. This is partly a case of lacking education, most product owners don't come from a software development background and development teams need to be understanding and helpful in these cases.

Another major contributor however, is that they have no motivation to collaborate. Most of these people are used to working on failed/failing projects and as soon as they see where the process is headed realize that they are actually supposed to do something, and doing something means opening themselves up to potential blame when things go wrong. I think there are numerous reasons - including lack of knowledge of the product itself, lack of vision of where they want it to go and fear of blame in the event of failure. In many ways, I cannot blame such individuals, its human nature and one of those situations I can't think of an easy way out of.

Oh well, not all problems can be solved!

Friday, September 5, 2008

Google Maps Flash/Flex API

Been playing around with Google's flash API with a simple flex example. I am very impressed at just how simple it is to get something going. I started off with a simple panel and added a child map container -

<mx:UIComponent id="mapContainer" initialize="init(event);" resize="resizeMap(event)" width="100%" height="100%"/>

Then, in the init method, I created a new Map object and added it to the container just defined. Note that you have to get a key from Google's map API web site.

public function init(event:Event):void {
map = new Map();
map.key="your_gmap_key_goes_here";
map.addEventListener(MapEvent.MAP_READY, onMapReady);
mapContainer.addChild(map);
}

When the map has been rendered, the MAP_READY event handler registered above is called. This is the clever part. Google's geocoder allows you to enter an address or partial address, and it magically converts it into its best attempt at a latitude/longitude.

public function onMapReady(event:MapEvent):void {
geocoder = new ClientGeocoder();
geocoder.addEventListener(GeocodingEvent.GEOCODING_SUCCESS, onGeocodingSuccess);
geocoder.setBaseCountryCode("US");
geocoder.geocode("Los Angeles, CA");
}

Finally, tying it all together -

public function onGeocodingSuccess(event:GeocodingEvent):void
{
var placemarks:Array = event.response.placemarks;
if (placemarks.length > 0)
{
map.setCenter(placemarks[0].point);
var marker:Marker = new Marker(placemarks[0].point);
map.addOverlay(marker);
marker.openInfoWindow(new InfoWindowOptions({title: "Address", content: placemarks[0].address}));
map.setCenter(marker.getLatLng(),15,MapType.NORMAL_MAP_TYPE);
}
}


Yes, I know its a very simple contrived example, but I can't get over how quick and simple it was to get this all going. There is a geocoder web service so that any language can use it. Going to try this with another language and then maybe explore some more APIs.