Friday, September 29, 2006

Tips For Business

I was perusing Derek Featherstone's blog the other day (entitled Box of Chocolates, which immediately got my attention!) when I came across two articles of interest about success in business:

Five Business Mistakes I’ve Made
Ten Smart Moves to Improve your Business

Both contain wise words, which are now of particular relevence to me, since I heard yesterday that my current employer has agreed to let me take voluntary redundancy in the New Year. Looks like I'll be working my notice and then free to set up my own freelance design & development company with my payoff! All very exciting, and just a little scary; but I'm looking forward to the challenge immensely.

Wednesday, September 27, 2006

Playpen #3 - Changing Your Stripes

You know what they say about Leopards... well at least you can get a table to change its stripes with a bit of DOM scripting.

It's a fairly trivial problem, but seeing as I'm pretty green when it comes to unobtrusive JavaScript, it's somewhere to start!

The Playpen #3 page shows off the table, which has a new class added on alternate rows, and defines a new background colour in the CSS. OnMouseOver will change the class again, to give another colour. But I'm having real trouble resetting the original class/colour onMouseOut... It's probably because the DOM is changed on the fly, and the original (not moused over) state of the alternate row is never actually "stored" on the page. If anyone has any suggestions, I'd be very interested to hear.

For the record, my stripeTables script looks like this:

function stripeTables() {
if (!document.getElementsByTagName) return false;
var tables = document.getElementsByTagName("table");
for (var i=0; i<tables.length; i++) {
var odd = false;
var rows = tables[i].getElementsByTagName("tr");
for (var j=0; j<rows.length; j++) {
if (odd == true) {
addClass(rows[j],"altrow");
odd = false;
} else {
odd = true;
}
}
}
}

addLoadEvent(stripeTables);

And this is highlightRows:

function highlightRows() {
if(!document.getElementsByTagName) return false;
var rows = document.getElementsByTagName("tr");
for (var i=0; i<rows.length; i++) {
var rowclass = rows[i].getAttribute("class");
rows[i].onmouseover = function() {
addClass(this,"highlight");
}
rows[i].onmouseout = function() {
this.setAttribute("class" , "rowclass[i]");
}
}
}
addLoadEvent(highlightRows);
I thought getting the Class attribute and storing as rowclass would allow me to reset it to what it was before the onMouseOver event, but sadly the table rows become unstripey once they are moused over!

The only other way I can think of doing it is writing some sort of subtractClass script to complement addClass, but seeing as this will almost certainly involve hideous regular expressions, I'm rather shying away from that.

Anyone have any ideas what I'm doing wrong?

Sunday, September 24, 2006

Upcoming Events

I've recently signed up for Upcoming.org so I can keep an eye out on what's in the pipeline in the near future. Two events caught my eye, coincidentally on consecutive evenings (all we need is a third one and they'll be like London Buses...)

Thursday 19th October
Web Standards Group Meeting # 2 where Microformats will be discussed. See Muffinresearch.co.uk for more details.

Friday 20th October
London Geek Dinner, special guest Molly E. Holzschlag. See the Geek Dinner website for more details.

Both events look like a good evening; perhaps I'll see some of you there.

Saturday, September 23, 2006

Playpen #2 - Lightbox JS

The d.Construct Backnewtwork has a neat feature which hooks into the Flickr API and pulls out all suitably-tagged images of the conference. Then when you click an image, it appears in a rather sexy overlay window.

I've been looking for some time, for an unobtrusive javascript method of displaying a photo + caption in a popup, as I have several sites which require this feature, without needing to go for the overhead of dynamic pages or a page per image. Trouble is, most of the methods I've found haven't been friendly if you turn off JavaScript!

The latest issue of .Net magazine (#154) also has a tutorial on Lightboxes (Javascript Image gallery widgets), so I thought I'd give Lightbox JS a try.

It works great straight out of the box, is dead easy to inplement, and will let you customise quite a few features. If users have Javascript disabled, they still get to see the content (the larger image when you click on the thumbnail, albeit in a boring vanilla window), so it's fine from an accessibility standpoint. And I'm pretty sure it's the very same method the backnetwork uses.

I knocked a quick gallery together, which you can see at the Playpen #2 page.

Thursday, September 21, 2006

Beta Blockers?

Blogger has a new beta version out and is inviting bloggers to move over from their existing account. This involves signing in with a Google account - either using an existing one, or signing up for a new account.

Using systems in beta can be a "fun" experience - you might be the person to come across that little-known bug which completely ruins your day! Or you might find that all the new features are worth the little rough patches while everything gets ironed out.

I'll admit I'm dithering over whether I should jump ship and go for the beta release. There are certainly some great new features like the ability to restrict read access and add "labels" (tags to you and me) for searching and categorising your blog posts. OK, these two are features which other publishing systems like WordPress have had for some time (and I know of folks who have defected to WordPress from Blogger in the past due to these deficiencies).

One "hidden" benefit is their new dynamic serving of pages. In the past, you had to "Publish" each new entry or the whole blog when you made changes, to give the static HTML pages which made up your blog. If you forgot to republish, the changes weren't seen until the next time you republished. This was pretty tedious and took quite a while if you had large blog. In the new version, changes are made to the database immediately and each page is served dynamically on the fly at each request. No more waiting for the spinning logo to finish its whirling!

My ideal scenario would be to move just one blog (probably the RugbyMad one) and play with it for a bit to see if I have any problems, before moving this blog too. But it's not clear from the support info if I can do this - effectivley, both blogs are linked from one account, and I think it's the account I'm moving and not the blog specifically.

Anyway, if you're interested in what new features are in the beta release, here are a few links for you to digest:

Wednesday, September 20, 2006

Playpen #1 - Google Maps

Inspired by Jeremy Keith's piece at d.Construct the other week, I've finally dipped my toe in the water of fiddling with APIs - and like many, I decided to go for a Google Map.

It helped that there was a tutorial about that very subject in .Net magazine (issue #153), but when I tried it out, it wasn't working properly. I checked my typing repeatedly for spelling errors, but couldn't find why the map was rendering OK but the overlay bubble was not. Firefox's JavaScript debugger kept coming up with some weird error message about XML mismatches on a line which didn't even exist in the file!

So I turned to my newly acquired tome by Chris Heilemann (see, Chris, after your earlier teasing, I did go out and buy it!): Beginning JavaScript with DOM Scripting and AJAX. Sure enough, in the AJAX-based chapter at the end, I found Chris' take on Google Maps.

Between that, and the Google Maps documentation, I finally figured out how to make a map, add custom marker, and have the info bubble pop up when the marker is clicked. You can see my bit of fun on the Playpen #1 page

Tuesday, September 19, 2006

Further Reading

There was a dangerously-tempting bookstall at d.Construct the other week, and I found myself buying two books which have been on my To Be Read list for a while:

Beginning JavaScript with DOM Scripting and AJAX - Christian Heilmann, Apress
I think it will be an excellent companion for the DOM Scripting book I've already read by Jeremy Keith. Will do a proper review when I've read this in more depth.

Blog Design Solutions - Andy Budd et al, Friends of ED
Great advice for customising your blog. Not just in terms of look and feel, but also advice on hosting your own blog, setting up testing environments, databases etc. I hope to give this blog a "lick of paint" in the near future!

I've also recently finished Dan Cederholm's excellent book:
Bulletproof Web Design - Dan Cederholm, New Riders
This one is a must-read for anybody seriously contemplating standards-based web design. Dan takes common table-based solutions (which can still be seen in the wild), explains why they are not bulletproof, and then reworks the solution in a standards-based way. I was very impressed with the session he did for @media in June, and this takes things even further. A great reference for bulletproof techniques.

Wednesday, September 13, 2006

Podcasts - Usability & Accessibility

Roger Kondrat over at TechWinter has two excellent Podcasts about usability and accessibility - two areas of particular interest to me.

To listen to the podcasts, go directly to Roger's blog:

#1: What is Usability and what does it mean to me? - a discussion with Lisa Halabi, Head of Usability at WebCredible.

#2: What is Accessibility and what does it mean to me? - a discussion with Trenton Moss, Head of Accessibility at WebCredible

They both make excellent points, and give sensible advice for those wishing to convince clients or superiours of the value of good usability and accessible sites.

It amazes me that, with so many positive benefits to using semantic XHTML and CSS, (not least the "freebie" benefit of much better SEO for your site), some company'sdesign mindsets are still rooted in tables and inline code soup.

Tuesday, September 12, 2006

Blogger/Web2.0 Mixer Event #2

Roger Kondrat over at TechWinter organised the second Blogger/Web2.0 Mixer Event last night, and a great success it was. About 40-50 bloggers, startups and web entrepreneurs got together for chat, beer and chips, at All Bar One in Soho.

I met some interesting people, including:
  • Chris Toudic of Jobneters, a new job network which has just gone live.
  • Chris Scollo and Philip Wilkinson of Crowdstorm (good to see you guys again), a new Social Shopping site which launched in public beta last week.
  • Ewan MacLean from SMSTextnews, who was very enthusiastic about all things mobile. He agreed to interviewed for a podcast by Andy White, of Summit Solutions, who was polling people about their Blackberries. Ewan made some very interesting comments about his use of mobile email devices.

Thanks again to Roger for organising the event; keep an eye out on his
blog for future events (I'll almost certainly mention it here too, when
there's more info to pass on).

Friday, September 08, 2006

d.construct debrief

Otherwise known as the dConstruct Party...

But first, I'd like to say what a great time I had at the conference. Some really informed and informative speakers; nice venue (apart from the pokey seats) and plenty of subjects to get the braincells working. And of courese, plently of opportunity to meet like-minded geeks for beer, chat and crazy golf!

Here's some of my pictures taken around the after-party.

[Sunset over the wreckage of the West Pier]

[Bright On Neon. OK, bad pun]

[Ross and his Paps on the crazy golf circuit]

[Who ate all the pies? A conference-goer wishes to remain anonymous]

You can see all my d.Construct/Brighton images at Flickr.

I met some great people, amongst whom were:

The other great thing about the conference was the excellent backnetwork site - no problems if you forgot to get someone's card; just look them up later, or read their aggregated blog posts and view their Flickr pictures, all in one place. Every con' should have one!

Lastly, here's a cheeky little desktop which I spotted during the first session of the day - great to stop the Over The Shoulder Snoopers?

[Stop Looking At My Screen!]

d.construct, Designing The Complete User Experience

A presentation by Jeffrey Veen

[Jeffrey Veen gets excited talking about his old job at wired.com]

Jeff Veen's presentation where to start? He's a very charismatic and engaging speaker, and this was no exception. You can download his presentation slides from his website. But here are a few bulletpoints.

Three criteria you should think about before producing a site:

  • Viability - business case and reasons for building a site
  • Feasability - can it be done?
  • Desirability - do people want it?
[The best products are the most desirable]

Your site's architecture and structure should always be extensible. Even if you start small, plan for expansion! Otherwise...

[What could happen to Amazon by the year 2050...]

Design faces global challenges, but even at a local level, terminology can vary widly. In the US, a survey was conducted to see what people asked for when ordering a fizzy drink. The results were pretty mind-boggling!

[I'd like a can of coke/soda/pop/other (delete as appropriate)]

Terminology can be important when labelling application functions. What happens when internal jargon creeps in - or is it megalomania taking over?

[Create New Country?!?!!]

Understanding Your Visitors is a crucial step in putting together a useful, usable website. Using simple stickie notes to group together functions vs what users are trying to achieve (card sorting) can show up gaps in both directions:

[Mind The Gap mapping]

Top half maps user tasks and bottom half maps website features - the trick is not to have gaps either way. No point wasting resources engineering something that nobody wants, but completely ignoring a facet of the site that is not currently available but users are crying out for.

Finally, Jeff pointed out that it's much more expensive to change your mind (add new features) the closer you get to launch. Proper user research means you are not wasting time, money and resources by going up the wrong garden path.

d.construct, Understanding Folksonomy (Tagging That Works)

A presentation by Thomas Vander Wal

  • Folksonomy is the result of personal, free tagging of pages and objects for one's own retrieval.
  • Tagging is done in a social environment (it's shared and open to others)
  • The act of tagging is done by the person consuming the information

These tags are important because people will use their own vocabulary to tag, which is meaningful to them. Tags can add perspective or context, and can make up for missing meta data.

The interesting things happen when you see tags in relation to the

Dual Folksonomy Triad:

[Thomas explained The Dual Folksonomy Triad]

People tag something within their own sphere of interest, but can then use that tag (in the form of a tag cloud search) to pivot and find material which other people have tagged in a similar fashion. Bonds and communities can form around these social groupings. Try following a tag trail in Flickr - you might be surprised where you end up!

There is always a tension between Consumer/Folksonomy vs Businees/Taxonomy. A business might wish to call their latest widget by the model name, MyFantasticWidget. But real consumers out there often refer to it quite differently, with emergent vocabulary. They might want to call it "DeadCoolWidget" instead. Business ignore such folksonomy at their peril.

I hope Thomas will post his slides to his blog in due course.

d.construct, Accessible Web Applications In A Post Web 1.0 World

A presentation by Derek Featherstone

[Derek waves his arms and steadfastly refeses to use the phrase "web 2.0"!]

Derek is an accessibility expert who is trying to get the message across that, even in a web2.0 world, accessibility should still be a goal, and and achievable one.

The web now is moving towards functionality and applications, and away from the document-centric approach. To make apps accessible, it is vital to separate the app into three distinct areas:

  • Content (eg semantic, standards-compliant XHTML)
  • Presentation (CSS does all the hard work)
  • Behaviour (javascript, AJAX or other behavioural language)
All too often, 1 and 2 are adhered to, but 3 still remains buried in the page, and therefore accessibility issues begin to kick in. What happens when someone doesn't have JavaScript enabled? Can they still see the content, etc.

One common example Derek mentioned was the default text you often find in a search box, which some JavaScript removes when the element gets focus. What happens if you're a blind user who fills in the box, tabs to the next form element, decides to tab back to the first, and can't understand why the text they thought they'd typed had disappeared!

Fix senarios - either make the JavaScript check, and ONLY removed the default text, but retain the user-input text. Or, perhaps don't use default text at all, but instead use a Tool Tip on the form element to give some more information.

Similarly, validation error messages should always appear near the form control they validate. If you put it at the top of a page, and a user has the screen hugely magnified, they will never see the error text as it's well out of their portion of the viewport. Perhaps changing the background colour of an element which fails validation could also be useful.

So if it's easy to get such simple things wrong, what about applications using AJAX which can be very complex? The answer is, wherever possible, to try and make the content linearised within the page by setting tab orders etc to "lead" users through their application journey in a sensible way.

Tabindex="-1" might sound like an invalid value, but it is supported by IE and Firefox. It can be programmatically, as it does not show up in a tab set, but you can use it to force focus onto an element.

Drag and Drop interactions are great for the mouse-enabled community, but pretty hopeless for those only using a keyboard. So don't make it the ONLY way of doing something. Also, make the "hit area" of links or things to drag as large as possible, so that users with impaired mobility don't have to be so accurate with their mouse movements.

d.construct, Mash My Flex Up

A presentation by Aral Balkan

Poor old Aral drew the short straw and was in the "graveyard shift" straight after lunch. I think he got us all on his side straight away by holding his hands up and coming clean:

["Don't shoot me, I'm a Flash developer!"]

Now I must confess that I'm no Flash guru. I have built one site with Flash5 (it was a long time ago!) and did a minimal amount of ActionScripting for that, but Aral's knowledge and experience was way beyond mine! So I didn't take too many notes, I just tried to watch and keep up :-)

  • He gave a quick overview of Flex 2
  • Lets you declaratively design iterfaces by using MXML
  • MXML is XML
  • Scripting uses ActionScript3 (which is ECMAScript4)
  • Looks like Java, smells like Ruby
  • AS3 is optionally typed, and a dynamic language
  • Compile MXML and AS3 to SWF bitecode
  • Each MXML tag represents an AS3 class
  • SWF bytecode executes in the Flash Player which is a virtual machine
  • Flex2 SDK is cross-platform and free
  • FlexBuilder2 is a visaul IDE based on Eclipse, costing ~£370
  • There's Flex Data Services and Server
  • RPC and real-time communication, video and audio streaming
  • There are also open source alternatives like Red5, AMFPHP and openAMF
Styling is applied with CSS. Data can be consumed via the following formats:
  • REST (see previous blog post)
  • XML-RPC
  • SOAP
  • JSON
  • Flash Remoting (= binary JSON)
For more information, see Aral's website and download his presentation.

d.construct, The Joy of API

A presentation by Jeremy Keith of Clear:Left.

Jeremy was very enthusiastic about the fun he's had meddling with APIs. He started off by explaining little about REST. I thought, "oh, no, something else I don't know about" but it turns out that REST is pretty much what the "normal" web is all about:

REpresentational State Transfer

  • The application state and functionality is devided into resources
  • Every resource is uniquely addressable. With HTTP, this is done via a URL.
  • It's a stateless client/server protocol: in HTTP, each message contains all the information necessary to understand the request when combined with the state at the resource.

Huh? Well, that more or less describes bog-standard web stuff: links, images, pages etc.

Then there's SOAP, Simple Object Access Protocol

Jeremy compared the APIs for four major sites which he has experimented with, and rated them for power, documentation (help) and his measure, "joy" of use. The results were as follows:

  • Flickr: power=9; docs=8; "joy"=9
  • Amazon: power=8; docs=8; "joy"=8
  • Delicious: power=6; docs=6; "joy"=6
  • Upcoming: power=6; docs=6; "joy"=6
Maps often seem to be the most popular API for experiementation. Mashing mapping with other data feeds gives excellent geo-tagged information. What happens if you drop a 100KT bomb on the Corn Exchange, Brighton? Enquiring minds want to know...

[Mashed - that's what most of Brighton would be if you dropped a 100KT bomb on the Corn Exchange]

The oft-cited Chicagocrime.org site, a prime example of mapping + other stats, was actually written before the GoogleMaps API was released! Sounds like hard work. Other geo-tagged fun sites included:

Overheard in New York + Google Maps = Overplot

[take care on 52nd and Lexington - watch out for the cannibal vegan!]

Gawker + Google Maps = GawkerStalker

[where are all the celebs to be found in NY?]

And finally, the most important point is that your mashups are only ever as good as your data. What happens if you look up Brighton with Yahoo maps instead of Google...

[oops! what happened to Brighton?]

Jeremy pointed us to some useful resources for getting started with APIs:

  • Programmable web tells you what's out there to be mashed
  • dapper lets you create a service from any website - DIY API?
  • microformats and all that they can achieve for you
  • mapstraction provides a common API for Google, Yahoo and Microsoft mapping

References from Jeremy's slides are available on his website.

d.construct, Web Services For Fun And Profit

A presentation by Paul Hammond & Simon Willison, of Yahoo!

Paul and Simon gave us a quick overview of the APIs and offerings available from Yahoo.

[Paul and Simon, a Hacking Double Act]

There were many examples of mashups given, some of which included:

Flickr + Yahoo Maps = geotagged photos

One of the most interesting aspects was Yahoo's Hack Day (Mash Up Or Shut Up), which is held about once a month. Dreamers, coders and hackers from all sorts of disciplines get together to prototype possible new products. There are only two rules, apparently:
  1. Build a prototype in a day
  2. Demonstrate to your colleagues
Basically, for internal and external projects, web services and APIs allow us to build new products faster, and helps innovation. Some products demo'd at a hack day have been in user testing in under a week! This just wouldn't be possible without published APIs.

The Yahoo Developer Network has loads of information for people wishing to utilise the APIs for:
  • Search
  • Spelling suggestions
  • Term extraction (generating tags from parsed text)
  • Output formats such as XML, serialised PHP, JSON
  • Flickr
  • Maps
etc.

Letting your API out into the wild can lead to some very surprising results! How about fully-draggable Pirate map, courtesy of Justin Everett-Church.

[ Yarr! ]

Or perhaps you need to find a picture from Flickr which matches your sketch - you need Retrievr

[Pimp up my sketch]

All the presentation slides are available at Paul Hammond's website.

d.construct, Web Services: Fuelling Innovation & Entrepreneurship

A presentation by Jeff Barr, "Web Services Evangelist" for Amazon.

Jeff's presentation went into some depth about the range of web services available from Amazon. There's an enormous range, mainly concerned with:

  • E-Commerce (Amazon E-Commerce; Historical Pricing)
  • Infrastructure (Simple Queue Service (SQS); Simple Storage Service (S3); Elastic Compute Cloud)
  • Web (Alexa Web Information Service; Alexa Top Sites; Alexa Site Thumbnail; Alexa Web Search Platform)
  • Workforce/Workflow (Amazon Mechanical Turk)
[here's Jeff, doing his stuff]

Business Models

The AWS offerings have various business models. The free one is the basic Amazon eCommerce API. Some of the ones I found most exciting were where developers had taken the Amazon catalogue and presented the data in really original ways:

liveplasma is a search and "discovery" engine which relates music of similar types. It has a fab flashy-feel interface and is quite off the wall in design - but still eminently usable. Go and have a play!

[liveplasma's view of interconnectedness, for the Rolling Stones]

hivegroup help you filter the myriad of technology available out there in a very graphical and interactive way. Follow the steps at their website and you'll see what I mean. Here are a couple of screenshots:

[basic search for digital cameras brings back a colourful display, grouped by manufacturer. The text filter at the bottom can whittle things down further]

[mouse-over a product and a summary panel about the item pops up]

Fixed Monthly Fee service was the Historical Pricing (Amazon Marketplace sellers can find this useful for realistic pricing of their goods for sale).

Usage/Resource-based pricing is used for the resource-heavy services such as S3, Simple Queue Service, Amazon Mechanical Turk.

Mechanical Turk

Mechanical What? It's basically a web service API for computers to integrate "artificial artificial intelligence" directly into their processing by making requests of humans. It generates a HIT - Human Intelligencd Task. The worker gets paid per task completed; you get the data you require. Such as - does the photograph I show you contain a human being? Most people would be able to say yay or nay in under a second - but a machine would take much longer and probably not always arrive at an answer.

Mechanical Sheep

So, OK, you have access to this service. What should you use it for? Well one guy asked people to draw a sheep, facing left. Why? Why not?! He collected 10,000 sheep at a rate of just over 11 per hour. You can see them all
at The Sheep Market. Here's a screenshot of my favourite woollyback:

[baaaaaaa! Sheep #10,000 is a black sheep, of course]

There are some thoughts on d.Construct's first presentation. I'll add some more soon.

Thursday, September 07, 2006

d.construct Pre-meet

I hate getting up early in the morning, so the thought of getting to Victoria (probably a 1½ hour journey for me) for 7:30am to be sure to be in Brighton by 9am tomorrow just wasn't on the cards.

So I decided to come to Brighton straight after work on the train, and consequently I was at the d.Construct pre-meet party by 8pm.

It was nice to meet a few folks beforehand, and socialise before tomorrow's conference. There was plenty of non-work non-geek chat to be had, as well as the usual "what do you do" sort of conversation, it just depended who you talked to.

I had a few glasses of wine, and a small group of us who'd been chatting most of the evening headed back to our respective hotels around 11pm - we all felt we needed our Beauty Sleep before tomorrow's conference - and there's another post-con event tomorrow evening where we can indulge in a few more beers as neccesary :-)