Version 3 of the Google Maps API was released recently and one of the coolest new features is the ability to modify the styling of the map elements. This signals a move by Google Maps into an ever greater level of customization and control. They have also dropped the need for an API key, making development easier and more enjoyable.
While the style customizations are limited to groups of feature types, you have separate control over label and geometry styles - allowing you to hide or highlight them according to your needs.
Loading map...
More information can be found on the Google Maps API page.
Add your comment »
So we all got our new New Zealand passports today and they are swish:

They're shiny, new, and must be practically impossible to forge given the shear quantity of detail, from the transparent photo at the front to the embossed embossed (yes, embossed twice) colour map of New Zealand at the back.
I'm looking forward to handing that bad-boy over at customs when we head to Europe later this year.
Add your comment »
As if to underscore my problem with Blogging, I began this post on my mobile phone - but because I couldn't finish it in time, and because no one wants to return to a blog post for updates - I never posted it and lost the draft when I closed the browser.
So how do we attack this personal mind-map/blog issue? As I alluded to earlier, I believe the solutions are already out there, but are yet to be brought together into a cohesive whole.
Some of the sites/concepts that I draw inspiration from:
1. Tumblr
In functionality, Tumblr hits the sweet spot between Twitter and Blogger - small atomic posts of a variety of data types. Tumblr encourages you to think of video and images as singular units of communication a la a blog post or tweet.
Tumblr is probably the home of the best user contributed design on the planet right now. Not that this is a design project per se, but check out this, this or this.
2. Wikis
That's Wikis in general, not Wikipedia as the most well known instance thereof. Wikis introduced the concept of versioning, collaborative editing and structured content. I find something exciting and informative about the ability to view the history of a document as it is created, mashed, spliced and refined. It adds weight and authority to the content and encourages relevancy and timeliness.
3. Facebook
Yes, I know it's terribly trendy to hate on Facebook at the moment (possibly justified, but), however Facebook lets you comment on everything. Which I happen to Like.
The idea that every piece of content - an image, an album, a status update, a new page - is something worthy of comment is a concept that is missing from blogs. Why can you only comment on the whole article? Why not the inset images or the video you've included? Why not the category tags or specific lines or - gasp - words.
Of course things are already going this way. YouTube allows you to comment on videos at specific frames, for example, so why not bring it to blogging?
4. Open Stuff
By which I mean:
5. Chrome Experiments
There are some really interesting experiments in browser capabilities here, but my favourite is also low-fi. Your World of Text is a persistant online text space. It has no boundary, anyone can edit it and it's fascinating to imagine how the idea could be extended to all sorts of applications.
Add your comment »
I have a problem. As a professional web developer I feel obligated to run some sort of website, if only to drape myself with a thin veneer of geek respectability. Inevitably that entails a blog, but history has tried to teach me time and again that I don't have the personality, patience or motivation to run one properly.
Maybe I need to learn something here. It's not that I don't have anything to say. On the contrary, I've got some pretty strong opinions about the state of tech that never make the leap from shouty beer fuelled bar discussion to the silent online forum.
I lieu of blaming myself, I got thinking: what is it about blogging that doesn't work for me? These are my thoughts.
1. Time Dependence
I've come to dislike the temporal nature of blogging. Do our opinions and thoughts change so rapidly that we can't stand by what we said yesterday, or revisit, refine and rethink our stated positions based on new information or experiences?
Given that those posts enter the historical record - if not on your owner server, then in the collective archive of Google and Co. - it is an extraordinarily fickle medium.
"Time" is the default sorting/association method between subsequent posts. Yes, it is an obvious default that exists out of convenience and made a lot of sense at the birth of blogging. You could assume that your followers had read previous posts, had some sort of common knowledge about what you were posting and would take charge of managing that 'thought update' process.
Since then, search engines have reduced the reliance on "time" and increased the reliance on "content". Readers are as likely to have arrived via a search term as by bookmark or RSS. Why not endevour to keep all content current - especially the content that people find useful over and over again?
Ultimately the question remains: just how should this information be ordered, interlinked and presented? That question can only be answered by the individual who is posted the data, but the "time default" has defined blogging and limited the usefulness of the content.
Which brings me to:
2. Categories
It would have been immediately apparant to the earliest bloggers that simply ordering posts by time wasn't enough. How do readers find similar or related posts back in the archive? How do we group information and make it easier to find? Categories were supposed to answer that question by allowing related posts to be grouped under different headers. There have been variations on the theme: tags provide a less rigid structure, for example, and a degree of automation has lessened the burden on the author.
Categories have never really solved the problem. The author has to decide what categories are useful to the reader. This forces them to use one of two strategies:
a) Shot-gunning as many potential tags as possible to try to cover all their bases, or,
b) Use a small number of broad categories and ask the user to trawl through the results.
Of course, neither strategy is ideal. Tag "clouds" that highlight frequently used terms attempts to improve the situation, but again, we're trying to solve a problem we've created for ourselves.
3. Interaction
One thing we've learned from social media is blogging is not social media. Comments on old posts are ignored, change is discouraged (it invalidates comments, for one) and the reader is usually forced to address only a small part of the original post. The alternative is for the reader to attempt to provide a long winded and complicated reply that has to refer back and forth between the original post and subsequent follow ups. There is no satisfactory way to integrate those comments with the content supplied by the blog author.
Comments are a poor way to communicate to your audience, and even less, are useless for building trust and two-way communication. There must be a better way.
What can be done?
I have some ideas that I will work through over the coming weeks. In summary, I believe all the problems listed above have been solved, albeit it different applications and capacities. It's time to pull those ideas back into the world of personal blogging.
The dream, therefore, is this:
To transform this blog into a constantly changing mind-map, where data is organised in an organic and fluid way that allows true interactions with an audience, that adapts to the needs of the individual reader, is amenable to change and creates a new engaging reading experience.
Like some sort of tiny bastard child of Wikipedia and Facebook. Who knows if it will work, but it will be interesting to try.
Add your comment »
I have to admit a mild addiction to Team Fortress 2 and Valve games in general. In another life I'd like to think I'd have made a great game developer* and I highly recommend the book Masters of Doom about John Romero and John Carmack's adventure from wayward hobby programmers to creators of the entire FPS genre. But what really attracts me to Valve games are their attention to game design as a science and the way they share their revelations with their customers.
Take the TF2 team's latest blog post about the upcoming Engineer update (for the uninitiated, the Engineer is one of 9 playable classes in this online-only first person shooter team game). They describe the thought processes behind continual improvement of their game:
The goal ... was to solve a perceived problem in the Engineer's play experience: always having to be tied to your base.
This is usually how we approach our game design: Identify a problem, then discuss the ways it could be solved. Our experience told us that even when the Engineer didn't feel immediate pressure, he still couldn't range out away from his base.
Importantly, not only do they test and refine ideas, they recognise when and why ideas don't work. They use these lessons to inform future improvements.
These may seem like obvious lessons, but knowing for certain why a particular idea doesn't work can often be as valuable as an idea that does.
These are lessons that can be applied to almost any programming design choices.
* Incidentally, the first programs I ever made were Basic A pick-a-path text adventures on XT machines. Goto 10 anyone?
Add your comment »
Jeff Atwood's recent blog post about the importance of cultivating teams rather than ideas drives home a point that has been repeating many times:
...instead of worrying about whether the Next Big Idea you're all working on is sufficiently brilliant, worry about how well you're executing
In more traditional industries you would probably say "...instead of worrying about whether your marketing budget is sufficient...". This shouldn't be clearer to Telecom by now. The shocking performance of their new XT network was, of course, preceeded by a marketing campaign that portrayed the network as fast, reliable and ubiquitous. The combination of raised expectations and dismal execution have only worked to further disillusion their customers.
There are shadows of Ferrit here. Telecom's foray into online shopping was a text book example of how ugly, difficult to use and largely unneeded website can defeat even the most exhorbitant television spend. Frankly, if your online product doesn't sell itself, it's not worth selling at all. Telecom should take a hint.
Add your comment »
This code snippet doesn't quite qualify as a Weecode at 150 characters, but it's a great demonstration of what can be done with a bit of jQuery and a blatant disregard for programming technique. This is a jQuery extension that enables AJAX content loading, with caching, on a valid link selector:
$.fn.cc=function(t){$(this).click(function(){
return!((d=(o=$(this)).data(h=this.href))?$(t).html(d):$.get(h,function(d){o.data(h,d);$(t).html(d)}))})
}
If you prefer a more - ahem - readable version:
$.fn.cc = function(t) {
$(this).click(function(){
return!(
(d=(o=$(this)).data(h=this.href))
?$(t).html(d)
:$.get(h,function(d){o.data(h,d);$(t).html(d)})
)
})
}
For example, the following code will tell links with the class "load" to insert the content at their URL into the div with the id "ajax-content":
$('a.load').cc('#ajax-content');
The first time the URL is requested the content will be loaded into the div. Subsequent calls will be loaded instantly, forgoing the unneeded HTTP request. This is particularly useful for pagination.
"But browsers can cache requests internally" you say. Well, yes, and no. Caching behaviour is unpredictable, and anyway, you're missing the point.
For the sake of completeness, a jQuery extension should handle library conflicts, the possibility that it will be auto-magically appended to other scripts, allow for chaining, and support failed AJAX requests:
;(function($){
$.fn.cc = function(t) {
return $(this).click(function(){
return!(
(d=(o=$(this)).data(h=this.href))
?$(t).html(d)
:$.get(h,function(d,s){
if(s=="success")
o.data(h,d) && $(t).html(d)
else
window.location=h
})
)
})
}
}(jQuery));
As an added bonus, you can cache requests before the user even clicks on the link. I like to pre-cache the 'next' link within pagination areas.
$.fn.precache = function() {
return $(this).each(function() {
o=$(this);h=this.href;
$.get(h,function(d,s){
if(s=="success") o.data(h,d);
});
});
}
Pre-cache content by:
Download the code here.
Or, for a much more readable version: use this file.
Add your comment »
JavaScript really is the hobbyists language. Everyone has two or three run-time environments sitting around, it has some interesting language features and it is genuinely useful. Of course, that doesn't stop people like me coming up with generally useless things to do with it.
And so I present: Weecode. Weecodes are JavaScript snippets in 140 characters or less - conveniently short enough for a tweet! If you feel like contributing, send your wee functions to @weecode and I'll post them back. At some point there will be a page here where you can vote and tag snippets.
I'm looking for particularly tiny, clever or obscure code. The fewer 'higher level' constructs you use the better (who needs a pesky Math object, anyway?). Does it appear to solve quadratic equations while calculating the volume of a sphere? Even better.
The idea is to show off your abilities, have fun and maybe learn something new along the way.
To start things moving, I've posted two "useful" functions:
Figure out the nth Fibonacci sequence number - 66 characters:
function F(n){p=0;n*=2;while(n--){p-=4/((n--)*(n%4-1));}return p;}
Calculate sin of x in n iterations (n > 6 is basically as good as Math.sin) - 105 characters:
function sin(x,n){n*=2;r=0;while(n--){for(i=(f=n),p=x;--i;f*=i,p*=x){}r-=(n--%4-2)*p/f}return r;}
Add your comment »
Wednesday Links:
- If you're feeling depressed about Auckland's long history of poor planning and miserable architecture, check out Auckland City Photos for a classier look at our fair city.
- Al3x, (of Twitter fame) reminds us why being a hero is bad for business:
Heroes are damaging to a team because they become a crutch. As soon as you have someone who's always willing to work at all hours, the motivation from the rest of the team to produce reliable, trouble-free software drops. The hero is a human patch. Sure, you might sit around talking about how reliability is a priority, but in the back of your mind you know that the hero will be there to fix what doesn't work.
- Google reveals it has been under attack by Chinese hackers. In the official post, Google all but accuses the Chinese government of attempting to hack into activists' accounts and announces it's intention to stop filtering Google.cn search results, even if it means the end of Google in China.
- Finally, goat teleportation bugs are exposed in a light-hearted Chromium bug report.
Add your comment »
I've had a few websites over the years, but this is a more cohesive effort to bring together various coding projects.
I've spent the sunny weekend split between listening to jazz in the Auckland domain, flying kites and setting up Subversion and Trac on a virtual server. It's been a fun weekend.
Trac is available at http://polemic.net.nz/trac/ and SVN is available via
http://polemic.net.nz/svn/. Not much to see at the moment, except for a set of Twitter widgets created for this blog.
Who am I? My name is Hamish, I'm a coder (PHP and JavaScript mostly) from Auckland, New Zealand. I'm involved in the GIS (Geospatial Information Systems) and SilverStripe communities in New Zealand, try to keep up with web standards and try to use Open Source software where possible.
Welcome to the new website!
Add your comment »