Mr Dingleberry and the Black Keys

April 30th, 2008

Just writing a quick shout out to Bruce Thurlow over at MrDingleberry.com and at The Black Keys Fan Lounge He’s just launching his sites, and if the first 2 videos are anything to go buy, it should be full of the kind of good random crap that I love.


GDirections 25 element limit

April 28th, 2008

There’s an undocumented feature in the Google Maps API when retrieve driving direction wherein any GDirections request with more than 25 elements returns an error with code G_GEO_BAD_REQUEST (400). This isn’t particularly helpful but I found the answer in the Google Maps forums somewhere. So the trick is to partition your array of waypoints into 25 part segments. Using Prototype 1.5 this is really simple using the inGroupsOf method, however using earlier Prototype versions is a little more tricky. I’m including a function that can do it with either.

function doDirections(elements) {
  var mapLimit = 25;
  elements = $A(elements);
  var groups = null;
  if('inGroupsOf' in elements) {
    groups = elements.inGroupsOf(mapLimit);
  } else {
    groups = [];
    var tempGroup = [];
    elements.each(function(point, index) {
      if(index == mapLimit) {
        groups.push(tempGroup);
        tempGroup = [];
      }
      tempGroup.push(point);
    }
  }

  groups.each(function(i) {
    var direction = new GDirections();
    //Insert your options for directions objects here.
    direction.loadFromWaypoints(i);
  }
}


The dodgy AFL website - part 1

April 14th, 2008

For a long time I have had problems with the AFL website, over the years it has progressively been getting worse and worse. First of all they did a web distribution deal with Bigpond a few years ago who then proceeded to put a completely non-functional 55px high bar on not only afl.com.au but also on each of the club websites. First of all, I’m not convinced this is in the best interest of the AFL, nor the clubs. Why is some random brand plastered in some of the most important real-estate on the page, and secondly why is the AFL diminishing it’s brand. Presumably, the AFL believes that selling the Internet distribution of it’s games is a better deal than dealing with this itself.

Sure, the Internet is tricky, making 24 hours of video available every week to x number of subscribers isn’t going to be an easy thing to do, (a task that Bigpond should have the expertise to pull off.) However the benefits of doing it could be awesome, not only as a money maker for the AFL but also to provide a great experience for the club members and AFL supporters in general. Imagine being able to grab any of the highlights packages (with advertising) for free, or a club Internet membership level where I can watch all 22 home and away games of my club.

This is a case of the AFL being stuck in the past as far as distribution of it’s assets goes, and really isn’t buying into the future of the game. The Internet is the way forward and could be used as an amazing marketing tool in the push for AFL to move across the globe, instead it is being used to push people to subscribe to Telstra’s Bigpond service. This is definitely something the AFL should have considered more carefully, and possibly invested in it’s future rather than it’s bottom line. It is definitely conceivable that the $20 million dollars it made in 2007 might look very small in 2011.


Control.Modal.Dialog - a lightweight javascript modal dialog library

April 8th, 2008

Recently we realised that we were in need of a modal form/dialog. Sure there is a javascript “dialog” function however it is completely useless in IE7 and what’s more it’s not really ideal in other browsers. Most of our work is based on Prototype/Scriptaculous and we have used Control.Modal in other projects so I went about writing a small layer that can sit on top of it to provide an easy to use modal dialog. Control.Modal.Dialog was born.

At the same time, I’ve spent about 3 minutes setting up Xebidy’s Code Library, we are planning on releasing more and more of the code we are writing internally to the world under Open Source licenses and hopefully Bootstrap will be one of those. Sadly, other things tend to get in the road, like clients.


Mozilla, Sugardaddies, Sustainability and Targets

March 26th, 2008

There has been a massive uproar regarding John Lilly’s post about Apple’s dubious update/install process of Safari (follow up regarding competition). I don’t think it needs to be discussed, but John Gruber (Apple fanboy extraodinaire) has a great post regarding exactly why it is wrong. The hoo-haa has largely been largely focused on the idea that this move jeopardises Mozilla’s primary income source, that is searches performed on Google originating from Firefox. Mitchell Baker has extended the commentary writing about her experiences with people often taking this, protecting your income stream, angle on conversations.

Let me show you how I see Mozilla’s angle on this. I don’t think Mozilla gives a flying duck about earning $20 million or $60 million from Google. Looking at their most recent financials you will see that the money is clearly not an issue. They are sitting on a nest egg of almost $60 million, with outgoings of around $20million. In the coming year, I suppose we can estimate that outgoings may be around $30million and even assuming that this move from Apple does squeeze the income down (which I doubt very much) the Foundation will still be turning over a tidy profit. It’s also good to keep in mind, that we don’t need to even speculate for more than a year over Mozilla’s financial situation. The books will be published. 

A recurring theme throughout Mitchell Baker’s writing is sustainability and I have no doubt that even with a hypothetic 50% dive in earnings the Mozilla Foundation will remain self-sufficient.

Now before I cast some nasturtiums of my own and add a little bit of food to the fire let me say this. I have no doubt that what John has said as CEO of the Mozilla Corporation is exactly what he means. However something that hasn’t been disclosed are details of the position of CEO of the Mozilla Corporation. I’m certain that in the contract of CEO there are certain goals that must be met and if they are exceeded, certain bonuses will be paid. If this isn’t true, then by all means I will eat my words, however I think that for any person to perform there should be a carrot and there is no reason that the Mozilla Corporation should be any different. (Although after I’ve thought about this, it’s certainly possible that a bonus could be paid purely on a board decision rather than any particular metrics)

It certainly is possible that market share or revenue is a KPI for the CEO or at the very least taken into consideration when their bonus review comes around and comments such as John’s could be seen as influenced by this. Now, don’t take this the wrong way, it is always going to be a hard line to walk and I have no doubt that John, Mitchell and the Mozilla Corporation will continue take Mozilla’s mission forward.


APIs are Hard but fun

March 22nd, 2008

Currently I’m working on an abstraction layer for the Google Maps API, this is purely written in Javascript, allowing any language to produce JSON objects and pass them quite seemlessly onto a Google Map. Originally this was planned to be able to be used across maps APIs (Virtual Earth, Yahoo Maps) but has descended into just being Google Maps - to begin with anyway. Currently the plan is to provide a set of handlers that know how to process specific datatypes and interact with the map ie. placing the markers, drawing the routes and monitoring changes. I think going forward, this can really help us at Xebidy move quickly, building rich location based applications very quickly.

It has been mentioned a number of times recently (though I can’t think who, probably John Resig) that building API’s is hard and I can’t help but agree. While it’s definitely challenging, I think it can be an extremely rewarding thing to get right. Developers really do feel the benefits of having a well thought out APIs with productivity gains and less headaches.

One of the biggest curses yet greatest benefits of using Javascript is the many ways you can morph the language. Using ‘apply’ and ‘call’ you can provide a developer down the track some powerful built-in functionality. Throughout the XEMap API I’ve tried to avoid any developers ever instantiating a handler of their own (no new XELocationHandler). This lets me rewrite the this variable whenever or however I please. To store configuration variables I pass an options array to each function. This in turn leaves those functions to be reusable out of the context of the API.


Ecosystems

March 12th, 2008

Something that amazes me in whatever I do, is how ecosystems form. So I thought that I would do a little bit of research as to what defines an ecosystem and learn a little bit more about them. The ever faithful Wikipedia defines it as:

An ecosystem is a natural unit consisting of all plants, animals and micro-organisms (biotic factors) in an area functioning together with all of the non-living physical (abiotic) factors of the environment.

There are 2 (which have interested me) instances of ecosystems (which aren’t necessarily mutually exclusive) operating here in Queenstown. The first are the bars, each has their niche, taking a certain subset of customers. When one closes, yet another subset of these punters move to one of a few places, either another pub/bar or a food outlet. Obviously, this timeframe becomes the niche for that establishment. One of these is bars, Bar-up pretty much caters to the workers at the other bars. There were 2 food outlets Fergburger and the Night/Day, this serviced the ecosystem perfectly - Fergburger is more expensive, tastier and better of quality, where as the Night/Day was cheaper, not as high a quality but much quicker and easier to grab on your way home.

Obviously, drunken revelers are hungry people and these 2 food outlets are an important part of the system. It was about 5 months ago that the equivalent of an oil-slick happened, the Night/Day burnt down. Now, 5 months later the ecosystem has just started recovering - people are used to heading to the bakery at 6am when it opens, when they sell yesterdays salad roll 2 for $3. It turns out though that the town is over correcting with 2 24 hour supermarkets slated to open in the next couple of months.

The other ecosystem that operates is the Ski/Mountain-biking industry. In the winter, this involves the mountains (lift operators), bus operators, rental operators, accommodation and even helicopter operators. Each of these provides a small part of the whole experience. Each business needs each other to exist and succeed. This happens for 5 months of the year, then almost overnight all the ski rental shops either change to mountain-bike shops, close or turn to more of a clothes shop for the summer. Some of these businesses actually have 2 whole shop-fronts (Browns Ski Shop/Vertigo Bikes) and seem to hardly lose a beat in the change over. Other businesses have winter and summer activities to, the helicopter operators have heli-biking and heli-skiing, the bus operators take more day tours and even the lift operators switch over for a few months taking mountain bikers to the summit of the mountain.

I suppose the interesting part of all of this is the affect that the “abiotic” factors have on the ecosystem, the weather obviously affects everything as does the burning down of the building. However, the ecosystem self corrects and continues to thrive.


The Upwards Nod and the Speechless Hello

March 11th, 2008

I spend a lot of time riding my bike, it having been my primary mode of transport over the last few years and I have noticed a common but odd form of communication. This signal is of course the Upwards Nod.

It is always at 5:30 in the morning when I am on my way home from work, from the other direction I will cross paths with someone who is obviously dressed for work. Nary a word needs to be spoken yet an Upwards Nod says, “I feel your pain”, or when you are halfway to the summit of a bastard of a hill and there’s a guy riding his bike the other way, you may be too exhausted to acknowledge him but an upwards nod is always thrown in your direction. Or waiting at a lift, looking to your side to the bike courier guy waiting as well. The upwards nod is the universal language of 2 people with nothing in common other than being in the same predicament.

Now closely related to this strange behaviour is the Speechless Hello. This is most often used when you cross paths with a pretty girl, stopping her would be weird and realistically, striking up a conversation regarding the relationship of the fixed price of the Chinese Yuan has to price of eggs, is probably not going to go down well - mainly due to the fact that she is already late for work but also because it’s a stupid topic to bring up. Not only is it a stupid topic, but the currency in China is actually known as the Renminbi further showing yourself to be a fool. Back to the Speechless Hello - you see the aforementioned Chinese princess walking down the street and for want of a better thing to do, you make eye contact, smile and mouth the word “Hi” or “Hello”. Now one of 2 things happens, she will reply in kind with a speechless hello or she will break the eye contact. Regardless of which she does, she keeps walking and you keep walking never to see each other again.

This is not the only use of the Speechless Hello, seeing a colleague through a window at work as you stroll into the office or when someone is on the phone are both common. You see, the Speechless Hello is widely used but it’s application is the same - You don’t have a good reason to interrupt the person with volume, so you use mute.

 

Note: Having done the smallest amount of research I believe the Renminbi is known as the Yuan or vise versa. The point shall remain for comedic value - it is also important to note that this comedy may only be valuable to me.


Converting the Random Minutes

March 9th, 2008

People who happen to spend more than a few passing minutes with me and a certain group of friends of mine (namely Jameses, Rod, Carl and Dingo) are amazed at the amount of randomness the conversations produce. While I can’t speak for other people, I have a suspicion our conversations start like any other, a random anecdote or piece of information kicks it off and moves from there. This is where the magic often happens, someone moves the conversation in a direction no-one could have ever predicted and we end up in Kansas, or Wonderland. (As an aside, I’ve never read nor watched Alice in Wonderland). Anyway, I digress - from what I’m not entirely sure due to the fact that there doesn’t appear to be a point to this post.

Now I will get to the point soon, so stay with me and the point shall present itself.

Now my history is a little bit scratchy, but I believe it was Jameses who coined the phrase “Random Minutes” in relation to the time that I must spend each day thinking of random/useless information. I had never thought about it like this, but I suppose he had a point. There is a lot of time while I’m riding my bike, or waiting for the coffee to be made where my mind wanders, through corridors that often will never be walked (or wandered) again. At the time Jameses suggested this concept I recall him targeting me specifically of this affliction, but I think as his recent post regarding his exploration of some new music suggests that he too is a sufferer.

Now the point of all of this explaining is not only to record the concept of “Random Minutes” for posterity but to announce a plan I have for this blog over the next week, and into the future. I am planning to spend time every day of this week writing on this blog, I’m talking about actual meaningful content. By meaningful content it might be random observations (read: not necessarily meaningful) but it won’t just be a link or 2 that I’ve collected from the net. My plan is to post something each day. I’m not sure if I’ll be able to keep it up but I’ll give it a shot and see how I feel come next Sunday.