Wednesday, 29 July 2009

Why bus tickets are getting bigger

I finally figured out why the oc transpo bus tickets are getting bigger and bigger - it's so that you feel you're getting your money's worth as they keep on increasing the cost. Pretty soon one ticket will be A4 size. An express ticket? It'll be poster size. Please don't ask about a rural ticket...

Monday, 27 July 2009

Physical signs going the way of the buggy whip

Driving around the other day in a city I wasn't familiar with, I was happy that we had the GPS that's on Laura's phone. When you have a GPS, you don't even need to see signs because the GPS is telling you what road it is before you can even see the road sign. This of course made me think of what it would be like in the future. I think that at some point augmented reality using a HUD will be a normal thing, sort of like a wearing watch is now (or having a phone to tell you what time it is).

Aside: I think that a watch is an exceptional good analogy in this case for figuring out where you are. Clocks were used for ship navigation and "time" is a fundamental component of GPS. An interesting read is the effects of relativity on GPS.

So, with everyone using a HUD that will help them navigate (in their own language of course), what use would a physical sign be anymore? It would just be an expense to build and maintain. If you had a "digital" sign that was available to people via their ubiquitous HUD's, your sign would always look new, be as you decide to have it today with much less cost in changing it, consume near zero of your own power (since you wouldn't have to pay to light it), no repair costs due to weather or vandalism, etc. Signs for navigation will go the way of the sextant. Signs for advertising? I'm assuming that it would be the same story. I just can't imagine how the conflict of "what advertisers want you to see" vs "what I want to see" will be resolved. Either way I figure that the future will be interesting. ;-)

Monday, 20 July 2009

I love the smell of rm -rf * in the morning

Smells like... victory.

Some times when you have been stuck in the same place long enough and aren't able to make any progress, there's something really satisfying about deleting it all and starting over. Sometimes that actually fixes things. Mostly in the case of Windows, and, as I discovered today, WebSphere.

Clean slates are nice. ;-)

Sunday, 19 July 2009

Who's the audience and how are they going to consume the product?

One thing that I find asking at lot of work is "who is the audience?". I find that it helps to eliminate possibilities for how work can be done. E.g. "let's document something in the issue tracking software so we can easily use it" - that doesn't help if the consumers of the info would never use the issue tracking software (upper mgmt) and they just want an executive summary. Figuring out the output first makes it a lot easier to determine what the input should be.

I found myself making this mistake yesterday with a different kind of situation. We had some family over for a bbq and I decided that we'd serve some watermelon. I tried my hand at trying to carve it like a pretty flower. After watching several demos online and then creating a product that looked like a drunken monkey took a weed whacker to it (but everyone said it was nice), it was put on the table. No one touched it. Not even myself. It could be a case of too much food, but I think that it was just in the wrong format to be eaten at the bbq. I should have just quartered and sliced it. Fancy carving - dinner party. Brunch - melon balls. BBQ - slices.

When making it, I was thinking of first step. I should have thought of the last step and worked backwards. If you don't know where you're going, any path will take you there.

Thursday, 16 July 2009

Open Mind - Clear Entertainment

Tonight we decided last minute to go to a movie. Laura picked the movie and I insisted that she not tell me anything about it. I didn't know what it was about, who was in it, how long, what genre, etc. The only thing that I knew was the name. As for any kind of media, I think that's the best possible scenario: going in with a totally open mind and just enjoying it as it stands. That's wonderful.

Out of interest, the movie was called The Soloist.

Tuesday, 7 July 2009

Everyone gets a meaningful URL

One of the things that I don't necessarily enjoy is messed up URL's. Don't get me wrong, I've done my part in creating some apps that create unreadable url's, but that doesn't mean that I liked it.



One of the issues we've had a work is part of CLF 2.0 (because it's a 2.0 world) where they talk about url's and how they should give equal treatment to both official languages when naming folders and files. Now, having people talented at development and translation and have those translations jive with what the client feels is correct can be almost impossible. So having url's that are contained within an app is just a recipe for tons of QA and redeploys as discussions over the proper word happens.



Using annotations and spring's @RequestMapping value attribute you can tie a controller or method of a controller to multiple url mappings. e.g. you can have your method run if someone hits home.html or maison.html The issue with this solution is 1) that your mapping is still within your code 2) you can't easily add support for another language.



Aside: stay with me on this one, I haven't worked through the issues like security. Andrew and I only came up with this last thing today.



Normally if you're using the @RequestMapping annotation you need to have the DefaultAnnotationHandlerMapping bean configured. This is what connects the url's coming into the app with the annotations configured. On start up it "registers" all the annotations. What you can do is have an external data store (property files, db, it doesn't matter) that will contain all the accepted urls for what's contained in the annotation.



Example:


public class MultilingualAnnotationHandlerMapping extends DefaultAnnotationHandlerMapping {

// TODO inject into bean
private String suffix = ".html";

// TODO inject as well, for both possibily have them as a Collection
private String prefix = "/";

@Override
protected void addUrlsForPath(Set<String> urls, String path) {

// this map you get from another service / file etc. Either cache it on this bean or somewhere else.
Map<String, Collection<String>> urlMapping = // ...

// the path is the thing that's found in the annotation
if (urlMapping.containsKey(path)) {
Collection<String> languageUrls = urlMapping.get(path);

// register each url
for (String url : languageUrls) {
super.addUrlsForPath(urls, buildKey(url));
}
}

// make sure we also add the original path as well
super.addUrlsForPath(urls, path);
}

private String buildKey(String path) {
return prefix + path + suffix;
}
}



Now in your controller class, you can just put in a something like @RequestMapping("my.admin.controller.key") and have the urlMapping object above populated with a list of all the different translations for that key. eg. You can have key "my.admin.controller.key" point to [home, maison, casa], etc. You can even leave it to the original home.html as your key and just add mappings for the other languages.



This solution only helps solve the different translations coming in, it would still be required to have a tag lib or EL function or something that would put the correct name into your jsp or whatever. But having done this you can have the app provide meaningful urls to all the users, rather than a subset or none.



I'm actually hopeful that this solution would work well. ;-)



Thursday, 2 July 2009

In order to fly you've got to let go

One thing that occurred to me tonight was the futility of trying to be as quick as possible in an environment where you do not control the database. No matter how agile you want to be, no matter how fast you think that you can go, you will never be able to be able to take advantage of the whole "convention over configuration" if an external (database) group has control. You're on the autobahn driving a Lamborghini with the limiter set to 80 km. Sure, that might have been a safe speed for your 1985 ford tempo, but it's not helping you keep the hourly rate down today. If that's a bottleneck that the org is willing to live with, that's fine because that's the org's call. If the org is unaware of it, that's a totally different thing.

The only way for the org to truly fly is to let go of some control, trust the people to do good work, and put in place the tools and processes that would help the people quickly identify and fix any issues.

Wednesday, 1 July 2009

1000th post!

Yay! 1000th post! And on Canada Day too. ;-)

A lot has happened since I've been blogging in this location. Started to date Laura, moved in together, got married and bought a house. Many friends have gotten married, babies have been born, and we've lost friends. In short, a lot of Life has happened in the last six years of blogging here.

Good times, good times. ;-)