Archive for December, 2007

Lang tip: ToStringBuilder - Quick trace statements

Friday, December 14th, 2007

Resurrecting this from the data for the Commons blog.

It’s always a pain to be putting in tracing statements (aka System.out.println) and find that the object’s data is hidden away in private attributes. One option is to break out the debugger, another (security manager willing) is to use the org.apache.commons.lang.builder.ToStringBuilder to output the Object in full. Here’s the very, very simple line of code to get this done:

System.out.println("TASK: " + ToStringBuilder.reflectionToString(task));

Map Links #2

Wednesday, December 12th, 2007

Some more links that I found and liked; not all map based, but in that kind of vein:

D&D Cartoon

Tuesday, December 4th, 2007

One thing I can put on whenever I need to get Nathan to sit down and watch TV with me is the Dungeons and Dragons cartoon series. He’s quite the fan.

Digging around on the wikipedia page and google, I managed to find the script for the never created final episode - ‘Requiem’. Venger is DungeonMaster’s son, as we already knew; there is a Nameless One hidden behind it all who is the real evil and the children redeem Venger before being offered the chance to head home.

Something that always amuses me on the intro is that while Venger is the “force for evil in the land”, Dungeon Master is merely their ‘guide in the realms of’, not a force for good. You’d think the kids would have picked up on that one. It’s a nice bit that matches the real DM concept in the D&D games (I presume). I also liked how the wizard goes from useless to the strongest character - pretty similar to the way wizards usually play.

Also worth mention - a fan film that made it onto the DVD.

Map Links

Monday, December 3rd, 2007

Some maps I saw recently that I like.

  • Who has the Oil? - A nice double valued map that uses country size to show who has the oil, and colour to show who uses the oil.
  • Military Spending 2002 - A whole site full of maps that use the same general design of country size ratio’d to the average to represent data. It’s a nice looking design, and this particular map is one I’d like to see updated for 2007 as my understanding is it would be much more telling.
  • Roman Britain - Roads in Roman Britain. I was reading about the Fen Causeway and got to this map. It’s not new, but I’ve always liked the history of the roads in England. I’d really like to work on an animated map that showed the roads of England evolving.

US Groceries and the Long Tail

Sunday, December 2nd, 2007

Six and a half years it be now. A little more - eighty months is mayhap closer to the truth. Eighty months since I last was able to enjoy the selection at Sainsburys. On a recent trip back, I realized just how much I’d forgotten the difference between Sainsburys and my choice in the US - Krogers (aka Fred Meyers in the NorthWest). Choice. There’s so much more when you’re shopping at Sainsburys - or at least at the Home Counties ones I’ve visited in my former life. Grumble, grumble, whine, whine, move on.

We all know of the Long Tail. A physical superstore can only stock 10,000 items (let’s say). Therefore it has to choose the top 10,000 sellers. An online superstore can choose 100,000 items and it finds that it can make more money from the other 90,000 than it does from the 10,000. These are random numbers - I’m not sure what the real ones are.

Thus the UK/US difference seems rather familiar, though at first glance it’s all weirded out. The US grocery has much cheaper storage and warehousing, so you would think that they would be under less pressure because they can store 10,000 items to the UK store’s 5,000. What’s odd is that they tend to contain 5 competing brands of a particular product while the UK store will choose less (if memory serves). Thus the UK store is able to have more choice by giving less space to the same product. I also think that the UK stores are the same size as the US ones (ignoring the more common habit here to tack a clothing store on the side) and must be recouping their cash in other ways.

I suspect it comes down to customer stereotypes. The US stores are able to stereotype their typical customer into far fewer sets than the UK ones do. Maybe because US immigration started a lot earlier than UK immigration and the large number of US immigrants form the same general culture, while in the UK it is far more a mixture (in the chemical, not merging into one liquid sense).

Or maybe it’s just because I grok the nuances of UK culture and happily pick those up (while not noticing the complete lack of support for others) while in the US superstore I miss out on the subtlety and walk past large sections of tripe. Hopefully not literally; some things deserve to be kept well hidden up North.

Anyway - all this had me pondering on the long tail. One of the things my employer is working on at the moment is a Long Tail for groceries; we have Amazon Fresh in Seattle (well, Kirkland) and I’m looking forward to using it when it extends out to my part of town. Plus there’s Amazon Grocery which we’ve already tested out and enjoyed a large shipment of Bunny Grahams from. Seems very nice for bulk orders, but increasingly we need to grok what the cost of items are at each location. I wonder if anyone has a website for that. Weetabix is a good example - Fred Meyer charge the insane price of nearly $6 a box, while Trader Joes come in at $2.50 or something like that. Needless to say Carrie gets to regularly goto Trader Joes under the guise of a Weetabix trip for me.

By the way - that’s my only non-assimilation item. I still eat Weetabix every morning for breakfast. We recently found Digestives again, so have introduced those to Nathan successfully, but we can take them or lose them. I import OXO cubes, stuffing mixture and custard powder, but use none of them regularly. So it’s import in terms of putting them in my suitcase once every few years.

Back to the Long Tail. It seems that we’ve lost something due to said successful Long Tail strategy. Sales seem to be a thing of the past. With the Fat Head, sales are important to move stock out even if the stock has value. You have to shift items so you can have room for the next season of product. With the Long Tail that drive doesn’t seem to be as needy. I wonder if I were living in the UK if I would still only really buy music each year in the January Sales when prices are slashed. As opposed to never buying it now because I expect to be getting January Sales prices :)

Sales still seem to happen to get rid of old versions of product, but those were always the ones to avoid. That and Mail-In Rebates, a curse on whomever still falls for those.