•
On Saturday I presented a short talk on building a basic android application in 20 minutes. This was the full process, from generating the shell project, to writing the code, generating the layouts, testing on the emulator, signing the application and uploading the binary. I wasn’t able to do this as “live” as I would have liked – I’ll perfect the routine in time for Barcamp Manchester, but the group did a good job of being a dummy audience.
For those interested the application is called “Barcamp Blackpool” (available on the Marketplace). It downloads the latest 20 tweets with the bcblackpool hash tag and displays them as a list. Clicking on an individual item will then launch a browser session showing the tweet on the twitter website. Basic but functional. The source code for the application is available on Google Code.
If there are other things people would like to see in a 20 minute Android demo – please feel free to comment on this post and I’ll see what I can do for Barcamp Manchester.
•
This weekend saw the first Barcamp Blackpool, held at the Blackpool Pleasure Beach. Many thanks go to @ruby_gem for organising the event, and to the various sponsors, including Yahoo for sponsoring the all important bar and Pixel Programming for ensuring we had a venue and noms. My apologies to to all those I may have caused hangovers to for the following day. We also managed to lose Phil Winstanley for a few hours.
Talks were wide ranging, from some light-hearted ones on upcoming social network Pokebook through to code reviews of the new W3C website and my own talk on building and publishing an Android application in 1 hour 30 minutes 20 minutes (code to follow).
Evening entertainment was provided by Paul Sylvester, who provided the BEST MAGIC SHOW I HAVE EVER SEEN (don’t let the website fool you). So much so, there’s speculation about hiring him for one of the next Geek Girl Dinners.
•

You know, it’s absolutely right. We’ve got so obsessed over security of liquids, toothpastes and belt buckles that people appear to have overlooked that laptops, iPods and mobile phones are potentially a hell of a lot more lethal. Maybe we should just point to all people with beards and laptops and scream “terrorist” instead.
•
Our industry is passioned and opinionated. This is a statement of fact. Be it Emacs vs Vi, Linux vs Windows, iPod vs … errr[1], people often fall in love with tools, philosophies and companies. And this is fine. Within the industry we call them “holy wars”, since the genuine fundamentalists have gone long past the tenets of logic and rationale (at least to the naked eye).
And like all good religions, their virtuous leaders are exalted[2]. Ballmer, Jobs and Stallman, each seen as personifications of the ideals they represent. Ballmer identifies with the corporate world, where big commercial software dominates. A big man with a bald head and a known temperament, he’s a figure people associate with boardrooms and big money. Jobs appears as a slight of a man, usually seen at keynotes with a trademark roll-neck and jeans he’s become the representative of design and cool, embraced by the younger generation. Stallman is another large guy, but rather than corporate groomed appears in t-shirts with long ragged hair and beard to match. A visual throwback to the hippy days, he comes with the embodiment of “free”, leading the free software revolution.
As any good personification of an ideal, their attitudes and ideas tally with their images. Ballmer has spoken repeatedly about the values of the corporate workplace and denounced free software as evil, Jobs speaks regularly on the functions of design and Stallman denounces any software or standards not truly free as evil.
And this is fine.
Because these contrasting attitudes set up a triangle of views with these figureheads and beliefs as cornerstones. There are those that will naturally gravitate towards these polarising opinions and those that will middle around the centre, or leaning between two points of view, subscribing to different tenants of each.
Some people will insist on using nothing but free software. Some people will insist on using nothing but beautiful, design driven products. Some people are driven by the business world and purely by suits and management. Some people may be primarily driven by business, but enjoy rollneck sweaters and iPods at the weekend. Some people may use free software on top of their proprietary systems. Some people may use free software on top of their business OS to talk to their design driven MP3 player[3].
And this is also fine.
The strength of a community is based upon the mix of people within it. Even within domain-specific communities, there will be a range of philosophies and beliefs which everyone will not subscribe to. And although we may occasionally decry these firm believers, and believe them to be as much a fundamentalist as their own religious leader we should respect (even if we disagree) their position because they provide the cornerstones of diversity for the community. The more diverse a community, the larger the range of interests and the higher the liklihood of intelligent (if sometimes a little crazy) discourse. The better the quality (not necessarily quantity) of debate, the more life exists within a community, and the higher the longer the community is likely to last. I would like to see those communities I take part in last for a very long time.
Humanist vs Belief
Free vs Commercial
Pragmatic vs Puritan
Emacs vs Vi
So I say welcome to the fundamentalists.
I say welcome to the middlers.
All communities need both.
[1] I’m kidding, there’s plenty of alternatives. I use a Sansa Clip myself.
[2] For the sake of simplicity, I’m restricting the set to three. I realise that in reality the triangle is more like a multi-sided polygon, but it creates a more dramatic image this way.
[3] Did I get all the combinations there?
•
Internet Explorer can be a right PITA when it wants to be. I’m using Thickbox to render on page dialogues in one of my projects. Thickbox relies on testing $jquery.browser.version for determining the version number of Internet Explorer.
!(jQuery.browser.msie && jQuery.browser.version < 7
Apart from the fact that it doesn’t always work. Below is what you would expect to be presented as a user agent string for IE8:
Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB6; SLCC2;
.NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0;
.NET CLR 4.0.20506; InfoPath.2)
So far today, I’ve seen three customers with the following string
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0;
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.1.4322;
.NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR
3.0.4506.2152; .NET CLR 3.5.30729)
Somewhere, somehow, the user agent string has become corrupted (and hence the MSIE 6.0). There’s some information on this available on Microsoft communities.
The way around this is to do some explicit regular expression checking on the useragent string. For those that didn’t know about this previously, it’s demonstrated by Jamie Thompson. He introduces a new property called $.browser.msie6 which is used to check for the presence of the IE6 string without the IE7 string.
$.browser.msie6 =
$.browser.msie
&& /MSIE 6.0/i.test(window.navigator.userAgent)
&& !/MSIE 7.0/i.test(window.navigator.userAgent);
You then adapt thickbox.js to test for this new property.
if ( !(jQuery.browser.msie6)) { // take away IE6
$("#TB_window").css({marginTop: '-' + parseInt((TB_HEIGHT / 2),10) + 'px'});
}
Which works great for IE6, great for IE7, fine for vanilla IE8 (which doesn’t suffer from the above bug), but falls down on corrupted IE8. Not to panic, simply adjust $.browser.msie6 to look for this additional string.
$.browser.msie6 =
$.browser.msie
&& /MSIE 6.0/i.test(window.navigator.userAgent)
&& !/MSIE 7.0/i.test(window.navigator.userAgent)
&& !/MSIE 8.0/i.test(window.navigator.userAgent);
The downside to this fix is that if and when Microsoft comes out with Internet Explorer 9, then you’ll need to adjust this script again to take this into account. I therefore propose a slight departure, using regular expressions to test for values above 6:
$.browser.versionOver6 = function() {
var re = /MSIE (\d+)/ig;
var match;
while (match = re.exec(window.navigator.userAgent)) {
if (match[1] > 6) {
return true;
}
}
return false;
}</p>
<p>$.browser.msie6 =
$.browser.msie &&
$.browser.versionOver6();
This modified version should work on all future versions of IE. Browsers which report a MSIE 6.0 as well as a MSIE 7.0, MSIE 8.0, MSIE 9.0, etc will now also report as not IE6, which should make filtering off IE6 fixes a little easier.
Enjoy.