<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>AlastairC &#187; Front-end code</title>
	<atom:link href="http://alastairc.ac/category/front-end-code/feed/" rel="self" type="application/rss+xml" />
	<link>http://alastairc.ac</link>
	<description>Kything web interactions</description>
	<lastBuildDate>Fri, 23 Jul 2010 18:06:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Detecting touch-based browsing</title>
		<link>http://alastairc.ac/2010/03/detecting-touch-based-browsing/</link>
		<comments>http://alastairc.ac/2010/03/detecting-touch-based-browsing/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 17:39:17 +0000</pubDate>
		<dc:creator>AlastairC</dc:creator>
				<category><![CDATA[Front-end code]]></category>
		<category><![CDATA[Mobile]]></category>

		<guid isPermaLink="false">http://alastairc.ac/?p=614</guid>
		<description><![CDATA[<img class="alignleft size-thumbnail wp-image-616" title="Touch me, copyright jjjohn." src="http://alastairc.ac/wp-content/uploads/2010/03/touch-me-150x100.jpg" alt="" width="150" height="100" />I came across a situation recently where a JavaScript widget didn't 'work' on the iPhone. It did technically work, but without knowing about two-fingered scrolling (and when you need to use it), it didn't appear to work. So how do you differentiate the iPhone (and other touch based devices) from a regular browser?]]></description>
			<content:encoded><![CDATA[<div class="update">Please note, the method I outlined used <code>ontouchmove</code>, which also picks up Google Chrome now. I&#8217;ve changed it to use <code>ongesturestart</code>, which seems to exclude Chrome (for now).</div>
<p><a href="http://www.flickr.com/photos/jjjohn/2947070519/sizes/o/"><img class="alignleft size-thumbnail wp-image-616" title="Touch me, copyright jjjohn." src="http://alastairc.ac/wp-content/uploads/2010/03/touch-me-150x100.jpg" alt="A finger pointing down towards you, blurry figure and trees in the background." width="150" height="100" /></a>I came across a situation recently where a JavaScript widget didn&#8217;t &#8216;work&#8217; on the iPhone. It did technically work, but without knowing about two-fingered scrolling (and when you need to use it), it didn&#8217;t appear to work. So how do you differentiate the iPhone (and other touch based devices) from a regular browser?<br />
Well, we all know <a href="http://www.quirksmode.org/js/support.html">object detection</a> beats browser detection, but what object would you detect?</p>
<p>The issue in this case was with the <a href="http://www.prismstudio.co.uk/plugins/stylish-select/0.4/">Stylish Select</a> jQuery pluggin. It replaces a standard drop-down with a nicer looking one. It is reasonably accessible as well, supporting keyboard use.</p>
<p>However, it creates a <code>div</code> with <code>overflow </code>of <code>auto </code>and a fixed <code>height</code>, which in desktop browsers creates a scroll bar. In the iPhone, it looks as though you can only select the ones that are initially visible, because there is no scroll bar.</p>
<p>In this case there is a nice fall-back: the select box that the JavaScript is replacing. The iPhone (and I assume other mobile browsers) show this in a system-native way.</p>
<p>So the question becomes how do you detect that a touch-based device is in use?</p>
<p>The solution came from this article on <a href="http://perfectionkills.com/detecting-event-support-without-browser-sniffing/">Detecting event support without browser sniffing</a>, however, it does more than I was looking for, and wasn&#8217;t aimed at touch based detection.</p>
<p>I put together a little script that so far, seems to do what I&#8217;d like:</p>
<pre><code>function isTouchDevice() {
   var el = document.createElement('div');
   el.setAttribute('ongesturestart', 'return;');
   if(typeof el.ongesturestart == "function"){
      return true;
   }else {
      return false
   }
}</code></pre>
<p>Currently this script gives good results for:</p>
<ul>
<li>IE8 / Win (no event detected)</li>
<li>FF 3.6 / Win (no)</li>
<li>Chrome / Win (no)</li>
<li>iPhone 4.0 (yes)</li>
</ul>
<p>I originally picked <code>ontouchmove</code> as a fairly advanced touch event, but Google&#8217;s Chrome started firing for that event. I&#8217;ve moved to <code>ongesturestart</code> which works for now, but may also be used in Chrome later.</p>
<p>If you have another device or browser, please try the <a href="/testing/touch_events.html">test page</a> and let me know the results.</p>
]]></content:encoded>
			<wfw:commentRss>http://alastairc.ac/2010/03/detecting-touch-based-browsing/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Removing empty HTML tags from TinyMCE</title>
		<link>http://alastairc.ac/2010/03/removing-emtpy-html-tags-from-tinymce/</link>
		<comments>http://alastairc.ac/2010/03/removing-emtpy-html-tags-from-tinymce/#comments</comments>
		<pubDate>Mon, 29 Mar 2010 14:53:24 +0000</pubDate>
		<dc:creator>AlastairC</dc:creator>
				<category><![CDATA[Front-end code]]></category>
		<category><![CDATA[WYSIWYG editors]]></category>

		<guid isPermaLink="false">http://alastairc.ac/?p=609</guid>
		<description><![CDATA[A little post for those that run into the same problem I had with TinyMCE and blank instances not quite being blank. I created a little configuration to remove empty HTML tags.]]></description>
			<content:encoded><![CDATA[<p>A little post for those that run into the same problem I had with TinyMCE and blank instances not quite being blank. I created a little configuration to remove empty HTML tags.</p>
<p>If you have an editable box with TinyMCE, and that box will appear on the website if it contains content, sometimes you can get a &#8216;blank&#8217; box. When a user deletes content from the box, they might not delete everything in the box, leaving some blank HTML tags.</p>
<p>For example, if there was a list of links, and you use the mouse to select the list, and press delete, it can leave either <code>&lt;ul&gt;&lt;/ul&gt;</code>, or <code>&lt;ul&gt;&lt;li&gt;&lt;/li&gt;&lt;/ul&gt;</code> depending on the browser.</p>
<p>In our CMS, when that went through to the front-end page the HTML content meant the box was displayed, but without visible content.</p>
<p>I messed around with some of the <a href="http://wiki.moxiecode.com/index.php/TinyMCE:API/tinymce.Editor#Events">TinyMCE API events</a>, ruling out onSaveContent and onSubmit.</p>
<p>The key event was <a href="http://wiki.moxiecode.com/index.php/TinyMCE:API/tinymce.Editor/onPostProcess">onPostProcess</a>, which allows you to run a script on the content before it is submitted.</p>
<p>Combine that with a little script from Stackoverflow to <a href="http://stackoverflow.com/questions/822452/strip-html-from-text-javascript#answer-822486">strip HTML from text with JavaScript</a>, and you get:</p>
<pre><code>tinyMCE.init({
   ... // other settings here
    setup : function(ed) {
    // If there is no text content, return nothing.
    //   NB: Image-only content would get swallowed.
      ed.onPostProcess.add(function(ed, o) {
            var text = "";
            var tmp = document.createElement("DIV");

            tmp.innerHTML = o.content;
            //console.debug("inner html=" + tmp.innerHTML);

            if (tmp.innerHTML) {
               text = tmp.textContent||tmp.innerText||"";
               text = text.replace(/\n/gi, "");
               text = text.replace(/\s/g, "");
               text = text.replace(/\t/g, "");
               //console.debug("if content, text=" + text);
            } else {
                text = "";
                //console.debug("else no content, and typeof =" + typeof(text));
            }
            if (text == "") {
                o.content = text;
                //console.debug("content set, possibly, get content = " + o.content);
            }

      });
   } // add comma here if there's another thing in the list
});</code></pre>
<p>The only weakness I know of in that, is that something containing only an image but no text would return a blank box. I left the console logging in (but commented) if you&#8217;d like to see what happens though Firebug.</p>
<p>Free free to use this or to feedback any improvements below.</p>
]]></content:encoded>
			<wfw:commentRss>http://alastairc.ac/2010/03/removing-emtpy-html-tags-from-tinymce/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stackoverflow dev day London &#8211; Roundup</title>
		<link>http://alastairc.ac/2009/11/stackoverflow-london-roundup/</link>
		<comments>http://alastairc.ac/2009/11/stackoverflow-london-roundup/#comments</comments>
		<pubDate>Sun, 01 Nov 2009 01:31:52 +0000</pubDate>
		<dc:creator>AlastairC</dc:creator>
				<category><![CDATA[Front-end code]]></category>
		<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Web APIs]]></category>
		<category><![CDATA[conference notes]]></category>
		<category><![CDATA[devdays]]></category>
		<category><![CDATA[presentations]]></category>
		<category><![CDATA[stackoverflow]]></category>

		<guid isPermaLink="false">http://alastairc.ac/?p=565</guid>
		<description><![CDATA[<p><img class="alignleft size-thumbnail wp-image-572" title="Dev Days logo." src="http://alastairc.ac/wp-content/uploads/2009/10/logo-150x93.png" alt="Dev Days logo." width="150" height="93" />I&#8217;ve just gotten back from a great day at the <a href="http://stackoverflow.carsonified.com/events/london/">Stackoverflow Dev Day</a>, I didn&#8217;t take my usual copious notes, but I thought a flavour of proceedings would be good to get down. For those who don&#8217;t know me, I have to add the caveat that I&#8217;m not a&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-thumbnail wp-image-572" title="Dev Days logo." src="http://alastairc.ac/wp-content/uploads/2009/10/logo-150x93.png" alt="Dev Days logo." width="150" height="93" />I&#8217;ve just gotten back from a great day at the <a href="http://stackoverflow.carsonified.com/events/london/">Stackoverflow Dev Day</a>, I didn&#8217;t take my usual copious notes, but I thought a flavour of proceedings would be good to get down. For those who don&#8217;t know me, I have to add the caveat that I&#8217;m not a programmer (kind of like &#8216;I&#8217;m not a laywer&#8217;), so I&#8217;m somewhat baised by my background in usability and front-end code.</p>
<h2><a href="http://www.joelonsoftware.com/">Joel Spolsky</a> &#8211; Keynote</h2>
<p><a href="/wp-content/uploads/2009/10/DSCF0741.jpg"><img class="alignright size-thumbnail wp-image-566" title="Joel talking about simplicity vs power" src="http://alastairc.ac/wp-content/uploads/2009/10/DSCF0741-150x112.jpg" alt="Joel talking about simplicity vs power" width="150" height="112" /></a>Joel&#8217;s keynote was on the theme of simplicity vs power, or rather, the third way.</p>
<p>I&#8217;m afraid that this is my interpretation entirely from memory, but essentially:</p>
<ul>
<li>A couple of fundamental assumptions are that users do not like to make decisions, and that just about every design decision should lead to the user being more likely to get laid.</li>
<li>There has been a great upswing in simple interfaces, at least partially lead by 37signals. (Perhaps another contributory factor is the rise of internet applications? Services that can do one thing well.)</li>
<li>However, some types of commercial applications (e.g. bug trackers) will need to cover the 80% of features that aren&#8217;t covered by these &#8216;simple&#8217; applications. Alhtough 80% of people use 20% of the features, they are often different features. Otherwise you are cutting off too many people.</li>
<li>Creating elegant code often takes more time and thought that simply typing out standard code. NB: Elegant was defined as doing things well, and making it look effortless.</li>
<li>Creating elegant interfaces also takes more work, both in creating the UI and often more so in the coding behind it.<br />
A good example is the Amazon one-click. When you move form the (standard?) method of click, then confirmation screen (then rest of checkout process), you suddenly have more work to do. For example, queuing the order (in case they order more things), allowing undo within a certain time, making sure there&#8217;s a default address etc.</li>
<li>Rather than not adding features to keep an interface simple, keep it simple by not forcing the user to make decisions. The interface should certainly start simple, but allow it to be extended, perhaps on a per client/site basis.</li>
</ul>
<p>Joel&#8217;s assertions certainly match my experience with Content Management Systems, which are probably the hardest and least solved programming / interface problem. Whilst 37Signals have been <a href="http://37signals.com/svn/posts/1941-press-release-37signals-valuation-tops-100-billion-after-bold-vc-investment">very successful</a>, I don&#8217;t see them tackling CMSs any time soon&#8230;)</p>
<h2><a href="http://yeoldeclue.com/blog">Michael Sparks</a> &#8211; Python</h2>
<p>Michael essentially took us through the finer points of Python by demonstrating how you can create the Google-style spelling match function, in 21 lines of code (plus a few books worth of content in text files).</p>
<p>It was really good to see an expert use the Python interpreter well (including running into a couple of problems, and solving them). I&#8217;d never really understood how you use it for complex functions before, for example,  indentation matters in Python, and you put it in a command line?? Anyway, that explains the spaces being preferred to tabs thing, and it will certainly help in my dealings with Django. <a href="http://twitter.com/kamaelian/status/5293735306">Hopefully</a> Michael can post something about it soon, in the meantime the <a href="http://norvig.com/spell-correct.html">code is available</a>.</p>
<h2>Joel Spolsky &#8211; Fogbugz</h2>
<p>We had plenty of Joel time today, this was his demo of <a href="http://www.fogcreek.com/FogBUGZ/">Fogbugz</a>, where it&#8217;s a disservice to describe it as bug-tracking software. It&#8217;s obviously modelled on Joel&#8217;s copious experience in developing software, and includes things like Bayesian driven email direction, and predicting launch times better than developers. I&#8217;m not sure it would work for us (juggling 15 web projects at the same time), but it will certainly make me wish for more next time I look at Trac or Bugzilla.</p>
<h2><a href="http://www.amazon.com/gp/product/0470344717">Reto Meir</a> &#8211; <a href="http://code.google.com/android">Android</a></h2>
<p>I have to admit, the technical side of mobile application development (rather than mobile web development) is still pretty intimidating for me, and doesn&#8217;t particularly float my boat. Reto also needs to either increase the font size in Eclispe, or use the &#8216;only when the cursor reaches the edge&#8217; settings in OS X&#8217;s accessibility preferences.</p>
<p>From doing previous presentations I&#8217;ve learned the hard way to:</p>
<ul>
<li>practice it at 800&#215;600 resolution,</li>
<li>check it in 1024, and</li>
<li>even if the projector supports more, keep it to 1024!</li>
</ul>
<p>On the positive side, it was good to see some use of Google moderator. Not only does it make it easy to ask questions (and for people to vote up the best questions), Reto answered the top ones on the spot, and has since <a href="http://moderator.appspot.com/#15/e=f3a76&amp;t=f32bb">answered them all</a>.</p>
<h2><a href="http://remysharp.com/">Remy Sharp</a> &#8211; <a href="http://jquery.com/">jQuery</a></h2>
<p><a href="/wp-content/uploads/2009/10/IMG_0212.jpg"><img class="alignright size-thumbnail wp-image-570" title="Remy Sharp's last slide" src="http://alastairc.ac/wp-content/uploads/2009/10/IMG_0212-150x131.jpg" alt="Remy Sharp's last slide" width="150" height="131" /></a>Remy gave good talk on jQuery (<a href="http://remysharp.com/downloads/write-less-do-more.pdf">presentation</a>), something I&#8217;ve used quite a bit. It was great to include how to creat a plugin, and it explained a few things I&#8217;d seen around but didn&#8217;t understand. I liked Remy&#8217;s approach to the brief of using code,</p>
<p>The things that most interested me were:</p>
<ul>
<li>Having looking up &#8220;<a href="http://longgoldenears.blogspot.com/2007/09/triple-equals-in-javascript.html">equality without type coersion</a>&#8221; (the triple equals).</li>
<li><a href="http://jsbin.com/">jsbin.com</a> looks like a very useful service.</li>
<li>There&#8217;s a good <a href="http://irc.freenode.net/#jquery">IRC channel</a> for getting help.</li>
<li>How to add a plugin to jQuery.</li>
</ul>
<h2><a href="http://www.codinghorror.com/blog/">Jeff Atwood</a> &#8211; Stackoverflow</h2>
<p>Jeff&#8217;s talk was less on code, and more the experiences around Stackoverflow, I can&#8217;t remember of it much specifically, but after listening to lots of <a href="http://blog.stackoverflow.com/">podcasts</a> it&#8217;s good to put a face to the voice!</p>
<h2><a href="http://www.linkedin.com/in/pekkak">Pekka Kosonen</a> <span>- Qt</span></h2>
<p><span>Pekka&#8217;s <a href="http://www.slideshare.net/pkosonen/qt-for-stack-overflow-developer-conference">presentation on Qt</a> was intriguing, partly for the upfront honesty (tackling people&#8217;s scepticism about platforms from Nokia), and partly because of the possibilities of<a href="http://qt.nokia.com/"> Qt</a>.</span></p>
<p><span>Although Nokia was presenting about Qt, the platform itself is not originally from Nokia, in fact, it is designed to build cross-OS applications, desktop <em>and </em>mobile. Applications such as Skype and Google Earth have been built with it, so it seems that it can produce native looking applications.<br />
</span></p>
<p><span>It looks like you have to go whole-hog into Qt development, it&#8217;s an SDK, IDE and they may even have server-side compiling of code to for platforms you don&#8217;t have. The demo wasn&#8217;t incredibly convincing, but it does seem like a an option to investigate if you need to develop desktop/mobile applications across several platforms. See also <a href="http://getjar.com/">getjar</a>.<br />
</span></p>
<h2><a href="http://stackoverflow.com/users/32136/phil-nash">Phil Nash</a> &#8211; <span>iPhone</span></h2>
<p><span>Phil&#8217;s <a href="http://www.levelofindirection.com/journal/2009/10/29/stackoverflow-devdays-london.html">presentation on iPhone development</a> wasn&#8217;t quite what I expected, it took us through a short history of the language that iPhone development uses (Objective-C), before creating a little app from scratch. Phil&#8217;s dry sense of humour and occasionally cheesy slides helped make the first half more entertaining, especially as I wasn&#8217;t really target audience and haven&#8217;t quite got the different versions of C straight yet.</span></p>
<p><span>The outline of Objective C drew a few gasps: garbage collection? It seemed most of the audience are used to higher level languages, and Objective C seems like a step backwards.<br />
</span></p>
<p><span>However, the impression was improved a great deal once Phil opened up Xcode and put together a quick application. Phil was the only mobile developer who managed this. As well as the support of the IDE, emulation is obviously easier for the iPhone than Android or Qt, because you&#8217;re targeting a much more narrow range of devices.<br />
</span></p>
<h2><a href="/wp-content/uploads/2009/10/DSCF0745.jpg"><img class="size-thumbnail wp-image-568 alignright" title="John Skeet on the source of bugs" src="http://alastairc.ac/wp-content/uploads/2009/10/DSCF0745-112x150.jpg" alt="John Skeet on the source of bugs" width="112" height="150" /></a>Jon Skeet &#8211; <a href="http://msmvps.com/blogs/jon_skeet/archive/2009/11/02/omg-ponies-aka-humanity-epic-fail.aspx"><span>Humanity: Epic Fail</span></a></h2>
<p><span>The &#8216;phenomenal&#8217; Jon Skeet presented a very funny look at why programming is generally hard, based on a rant he had recently about time zones. There isn&#8217;t much for me to say on this, but it&#8217;s worth checking out the presentation and audio on the <a href="http://blog.stackoverflow.com/">Stackoverflow podcast</a> soon.<br />
</span></p>
<h2><a href="https://www.cs.tcd.ie/~pbiggar/#so-2009">Paul Biggar</a> &#8211; <span>How not to design a scripting language</span></h2>
<p><span>I hadn&#8217;t really expected much of this talk, essentially what&#8217;s wrong with modern compilers, however, Paul&#8217;s enthusiasm really carried it.<br />
</span></p>
<h2><a href="/wp-content/uploads/2009/10/DSCF0747.jpg"><img class="alignright size-thumbnail wp-image-569" title="Christian Heilmann presents" src="http://alastairc.ac/wp-content/uploads/2009/10/DSCF0747-150x112.jpg" alt="Christian Heilmann presents" width="150" height="112" /></a><a href="http://icant.co.uk/">Christian Heilmann</a> &#8211; <span>Yahoo! Developer Tools</span></h2>
<p>For me the best was saved until last. I haven&#8217;t seen Christian talk on this before, and despite reading about Yahoo! pipes and YQL, I just hadn&#8217;t really groked it before.</p>
<p>It doesn&#8217;t really hit home until you see someone put an example together in front of you, but the upshot is that there are about a <strong>100 APIs</strong> (everything from Amazon to Weather) that <strong>you don&#8217;t need to read</strong>.</p>
<p>You select a data source from the right of the <a href="http://developer.yahoo.com/yql/console/">console</a>, adjust the &#8216;selector&#8217;, the YQL statement top left, and preview the results in the middle.</p>
<p>If the result is good, then copy the URL from the top right box, and use that with your backend (or <abbr title="Asynchronous JavaScript and XML">ajax</abbr>/<abbr title="Asynchronous JavaScript and json">ajaj</abbr>), and hey-presto.<br />
Example uses are:</p>
<ul>
<li>Showing all your disparate content on other sites in one place, for which <a href="http://icant.co.uk/">Christian&#8217;s site</a> is a prime example. It&#8217;s basically built with YQL, virtually all the content is from other sites! (Presentations, videos, books, blog articles etc.)</li>
<li><a href="http://www.wait-till-i.com/2009/10/29/yqlautotagger-automatic-tag-generation-with-a-single-line-of-javascript/">YQLAutoTagger</a> – automatic tag generation with a single line of JavaScript.</li>
<li><a href="http://github.com/codepo8/TweetTrans">Translate tweets</a>.</li>
<li>Create a set of <a href="http://isithackday.com/hacks/ajaxexperience/flickrgeophotos.html">Flickr photos from a particular geo-location</a>.</li>
<li>You can even scrape HTML for redisplay, narrowing the area using an xpath statement.</li>
</ul>
<p>It uses a SQL like syntax to allow a great deal of granularity, both in terms of filtering things to get just the information you want, as well as using several input sources (URLs) at the same time.</p>
<p>I am not closing the YQL tab I have in Firefox until I&#8217;ve used it somewhere! I think this is the closest <a href="http://developer.yahoo.net/blogs/theater/archives/2009/04/screencast_collating_distributed_information.html">video on YQL</a> I&#8217;ve seen that covers the same content.</p>
]]></content:encoded>
			<wfw:commentRss>http://alastairc.ac/2009/11/stackoverflow-london-roundup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Local W3C validator on OSX</title>
		<link>http://alastairc.ac/2009/02/local-w3c-validator-on-osx/</link>
		<comments>http://alastairc.ac/2009/02/local-w3c-validator-on-osx/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 23:26:26 +0000</pubDate>
		<dc:creator>AlastairC</dc:creator>
				<category><![CDATA[Front-end code]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[validator]]></category>

		<guid isPermaLink="false">http://alastairc.ac/?p=424</guid>
		<description><![CDATA[<img class="alignleft size-thumbnail wp-image-425" title="Local Validator" src="/wp-content/uploads/2009/02/local_validator-150x100.gif" alt="Local Validator" width="150" height="100" />You may have noticed the W3C was asking for contributions for the running the validator. There is a way that you can support the W3c validation service - by not using it. The public version that is. If you use OSX, you can install it locally.]]></description>
			<content:encoded><![CDATA[<p>You may have noticed the W3C was asking for <a href="http://www.w3.org/QA/Tools/Donate#donate_info">contributions for the running the validator</a>. There is a way that you can support the W3c validation service &#8211; by not using it. The public version that is. (This is a <a href="#comment-122248">slightly misleading</a> statement, but I&#8217;ll leave it for the purpose of the article). If you use OSX, you can install it locally.</p>
<p>You can run it as a program by installing the <a href="http://habilis.net/validator-sac/"><q>Validator SAC</q></a>:</p>
<blockquote><p>Validator <abbr title="[Stand Alone Complex]">S.A.C.</abbr> (Stand Alone Complex) is a stand-alone, easy to install, version of the W3C&#8217;s HTML / XHTML Markup Validator for Mac OS X.</p></blockquote>
<p>Even better, you can install it as a local &#8216;service&#8217;, essentially a web application running on Apache on your local machine. That means you can adjust the <a href="https://addons.mozilla.org/en-US/firefox/addon/60">Web Developers Toolbar for Firefox</a> to use you local version. In the &#8216;options&#8217; of the toolbar, go to the &#8216;tools&#8217; options and adjust the URL of the HTML validator.</p>
<p><a href="/wp-content/uploads/2009/02/local_validator.gif"><img class="aligncenter size-full wp-image-425" title="Local Validator" src="/wp-content/uploads/2009/02/local_validator.gif" alt="Local Validator" /></a></p>
<p>It&#8217;s pretty straightforward to <a href="http://habilis.net/validator-sac/#advancedtopics">setup as a local website</a>, especially if you use Apache locally on OSX. (<a href="/notes/osx/server-admin/">My setup</a> is a little more complex, but the principle is the same).</p>
<p>If you&#8217;ve adjusted your hosts file to include <code>http://validator/</code>, you just need to wrap the supplied file in a <code>VirtualHost</code> setting and setup your Apache config to use that.</p>
<p>This allows you to check local sites behind firewalls (or just on your own laptop), and to save the W3C some bandwidth, so I&#8217;d encourage standards aware developers using OSX to give this a go.</p>
]]></content:encoded>
			<wfw:commentRss>http://alastairc.ac/2009/02/local-w3c-validator-on-osx/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>dConstruct 2008 notes</title>
		<link>http://alastairc.ac/2008/09/dconstruct-2008-notes/</link>
		<comments>http://alastairc.ac/2008/09/dconstruct-2008-notes/#comments</comments>
		<pubDate>Sun, 07 Sep 2008 15:46:36 +0000</pubDate>
		<dc:creator>AlastairC</dc:creator>
				<category><![CDATA[Front-end code]]></category>
		<category><![CDATA[Usability / IA]]></category>
		<category><![CDATA[Web APIs]]></category>
		<category><![CDATA[conference notes]]></category>
		<category><![CDATA[dconstruct]]></category>
		<category><![CDATA[dconstruct08]]></category>
		<category><![CDATA[psychology]]></category>
		<category><![CDATA[social applications]]></category>

		<guid isPermaLink="false">http://alastairc.ac/?p=336</guid>
		<description><![CDATA[<p><a href="http://flickr.com/photos/cyberdees/2835479285"><img class="size-thumbnail alignleft" title="Picture from Cyberdees on Flickr." src="http://alastairc.ac/wp-content/uploads/2008/09/dconstruct_banner_cyberdees-150x99.jpg" alt="dConstruct banner." width="150" height="99" /></a><br />
My journey to <a href="http://2008.dconstruct.org/">d.construct</a> was a long one, I hadn&#8217;t even checked which talks were when, so I was very thankful for the schedule built into your name tag! I took quite a few notes for general use, but please to refer to the originals where possible:</p>
Keynote:<p>&#8230;</p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://flickr.com/photos/cyberdees/2835479285"><img class="size-thumbnail alignleft" title="Picture from Cyberdees on Flickr." src="http://alastairc.ac/wp-content/uploads/2008/09/dconstruct_banner_cyberdees-150x99.jpg" alt="dConstruct banner." width="150" height="99" /></a><br />
My journey to <a href="http://2008.dconstruct.org/">d.construct</a> was a long one, I hadn&#8217;t even checked which talks were when, so I was very thankful for the schedule built into your name tag! I took quite a few notes for general use, but please to refer to the originals where possible:</p>
<h2 id="urban-web">Keynote: The urban web, <a href="http://www.stevenberlinjohnson.com/"><cite>Steven Johnson</cite></a></h2>
<p>This was an interesting introduction to the topic, highlighting the social aspects of the story of understanding cholera outbreaks. Unfortunately I wasn&#8217;t set-up to make notes at the time, but from memory it centred around <a href="http://en.wikipedia.org/wiki/Cholera#Research">the story of John Snow</a>. I&#8217;ve heard this before in terms of good information design, but this highlighted important aspects such as the &#8220;social hub&#8221; that was the local vicar.</p>
<p>The modern examples mostly came from his company, <a href="http://outside.in/">outside.in</a>, including <a href="http://outside.in/radar">radar</a>. Radar appears to be an aggregator of local info, like a Google News for <em>local</em> blogs and tweets.</p>
<p>I&#8217;m not sure how it works, although one method it employs appears to be language to identify location. For example, monitoring a twitter stream, it picks up a tweet about &#8220;Dizzy&#8217;s&#8221;, a restaurant (or similar) in Brooklyn. Relying on language for this sort of thing seems flawed, as there are far too many overlapping terms (how many Springfields in the US for example?). However, perhaps there&#8217;s more to it?</p>
<p>In general it did make me think that it would be good to have a <code>geo</code> attribute, like the <code>lang</code> attribute, to show where a section of content is relevant to a particular real world location. However, I&#8217;m not sure what the values should be? Lat-long (numerical), or specified locations, like &#8220;Brighton, UK&#8221;. There&#8217;s probably a microformat for it already, but would be nice to have it baked in properly as a fundamental aspect of HTML5.</p>
<p>Steven also showed a nice way of showing how much of a voice you have compared to other people, with percentage pie charts of posts shown over various map locations.</p>
<h2 id="playing-the-web">Playing the web, <a href="http://www.toastkid.com/"><cite>Aleks Krotoski</cite></a></h2>
<p>(This is more of a notes format, simply getting down what the speaker was saying, my comments are in parentheses. Aleks is a very animated, entertaining speaker, which you won&#8217;t get from these notes!)</p>
<p>Aleks starts off by wondering why there is little overlap between the games and web industries. (&#8216;Games&#8217; and &#8216;web&#8217; are used for their respective industries from this point.)</p>
<p>She first knocks down graphics and story as things that matter (critically) in games. Play is what makes people &#8216;stick&#8217;.</p>
<p>(Side note: I&#8217;ve often thought that the fun definition of a &#8220;User Experience Consultant&#8221; should be: <q title="Quote from Alastair Campbell">the urge to make verbs into abilities</q>. E.g. usability, findability etc. In this case it would be playability. Not a new term, but it did remind me about this!)</p>
<p>She describes the term &#8216;Experience Economy&#8217; as essentially a boring term for making things fun.</p>
<h3>Control systems</h3>
<p>The things game designers can use to increase playability:</p>
<ol>
<li>Carrots. Give people more for contributing more. It could be points, character levels, collectables etc. The web does do this to some extent, often you give more (e.g. personal details) and get more out of a site.</li>
<li>Openness. As in, games that are open as you play them rather than on rails, with no exploration. (This reminded me of the &#8220;<a href="http://en.wikipedia.org/wiki/Zone_of_proximal_development">Zone of proximal development</a>&#8221; where there is a level of difficulty that is helpful.)</li>
<li>Have an important end goal, something to get to, or achieve.</li>
</ol>
<p>The web has has much greater community, or at least, potential community, but games developers have really started utilising communities, e.g. hiring community managers.</p>
<p>The web does have a few rallying points, e.g. digg.</p>
<p>From the community comes social value, out of the central thing (that the designers created), comes other output from the social community, e.g. characters / assets that people create and then can sell on ebay.</p>
<p>Personalisation causes investment from the person. This is relatively new in the web as a common feature.</p>
<p>There is a social urge to collect things, so far web developers tend to concentrate on points, but could be anything to challenge yourself. (I missed the example URL for this, it was a virtual badge-collection site that rewards users for doing things like not using google for 7 days with particular badges. Sounded like &#8216;peanod&#8217; or something, does anyone know?)</p>
<p>There is very little focus within games dev on theory, they are gamers who create games. Thoroughly separate from <abbr title="Human Computer Interaction">HCI</abbr>. It is a case where you can show that the process has worked without knowledge of the theory of why.</p>
<p>(The main thrust which doesn&#8217;t come through from the notes is that the games and web industries have a great deal to learn from each other.)</p>
<h3>Questions</h3>
<dl>
<dt>Is &#8216;<a href="http://www.littlebigplanet.com">Little big planet</a>&#8216; a first step?</dt>
<dd>The guy from Sony (not media molecule), comes from a web background. But it seems few and far between that this happens. There are 5 major games companies in brighton, but hardly any people here at this web conference. </dd>
<dt>It&#8217;s got wifi (on a Nintendo DS I think?), why can&#8217;t I do more with it?</dt>
<dd>Brief History tour: The most innovative device was the Dreamcast, it was so far ahead of it&#8217;s time, only now are we seeing what it could have done, and seeing those things in the mainstream. Why not more integration? In early 2000, the Dreamcast was connected to the internet. You could create your own content, share it, play a multiplayer online games, and it also had VMU (Visual Memory Unit), part of the controller. This little device had a little screen which you could take out, about the size of (modern) mobile phone. You could play a pared down version of the game. E.g. Sonic, you could take it away and play a sub-game that then affected the main game. The game cube did something like this. We&#8217;ve still not really seen the realisation of these things.</p>
<p>Information around the Xbox 360 launch said you&#8217;d be able to connect the Xbox with other machines, e.g. iPods, Playstations etc. There are lots of cross-platform issues, but the potential is there.</p>
</dd>
<dt>What creates the divide? (Between the web and games industries)</dt>
<dd>They developed in two different ways. In the UK, the games industry developed out of a bedroom coder mentality.  A small pocket.The Web industry attracted different type of people, as the connections/connectedness of the online sphere have always been there.</p>
<p>Now people really engage with the web, there should be more cross over.</p>
<p>The games industry has some unfortunate perceptions, e.g. games are childs playthings, and people generally don&#8217;t recognise the depth and breadth of what is going on.</p>
<p>Perhaps it&#8217;s a marketing issue?</p>
</dd>
<dt>(I couldn&#8217;t hear the question, but&#8230;) What about the barrier to do with open standards on web vs very proprietary practices in games.</dt>
<dd>I think that will change with more smaller developers using (perhaps open?) standard environments. </dd>
<dt>What about a negative feedback loop with games players becoming games designers. A lot of web practice is about designing for another audience that is not you.</dt>
<dd>There has been a lot of research recently in games industry, see the paper <a href="http://elspa.co.uk/assets/files/c/chicksandjoysticksanexplorationofwomenandgaming_176.pdf">Chicks and Joysticks: An Exploration of Women and Gaming</a>. Another perspective is the DS&#8217;s brain training, plus the marketing with the adverts of non-typical gamers (e.g. Nicole Kidman using the DS). The industry recognises the current audience (The average age of an Xbox gamer is 28), but we need to adapt or there will be a drop-off.In the web industry? I&#8217;m not sure, I&#8217;ll think about it and I might blog about it.</p>
</dd>
<h2 id="cognitive-bias">Leveraging Cognitive Bias in Social Design, <a href="http://bokardo.com/"><cite>Joshia Porter</cite></a></h2>
<p>This is about the merging of the web with social psychology.</p>
<p>Web designers need to add (social) psychology tools to their belt. But, those worlds haven&#8217;t collided yet.</p>
<p>A little experiment: which of these two restaurants would you choose? (95% choose second)</p>
<p>1st has physical barrier, and no one sitting down. The second has lots of people there, with a small queue.</p>
<p>Calls this the &#8216;<a href="http://en.wikipedia.org/wiki/Bandwagon_effect">bandwagon effect</a>&#8216;. Associated with sheep mentality. With little information available we tend to follow others. It&#8217;s one way (heuristic) we use to make decisions.</p>
<p>It&#8217;s a short-cut rather than doing the logical thing: gather all the needed information. Makes up for a lack of resource.</p>
<p>Sometimes there is &#8216;<a href="http://en.wikipedia.org/wiki/Cognitive_bias">cognitive bias</a>&#8216;, and these are often predictable outcomes.</p>
<p>There is the <a href="http://en.wikipedia.org/wiki/Lake_Wobegon_effect">Lake Wobegon effect</a> (where every one thinks they are above average).<br />
We all know the <a href="http://en.wikipedia.org/wiki/Self-serving_bias">Self-serving bias</a>, and the prediction bias (leads to underestimate work, part of the <a href="http://en.wikipedia.org/wiki/Focusing_effect">Focusing effect</a>).</p>
<p>The main paper for this stuff is <a href="http://cocosci.berkeley.edu/joe/Tversky1974">Judgment under Uncertainty: Heuristics and Biases</a>, by Amos Tversky; Daniel Kahneman in 1974, (although there are plenty of easy links to the Wikipedia for this!).</p>
<h3>Examples</h3>
<p>(You could probably go through the <a href="http://en.wikipedia.org/wiki/List_of_cognitive_biases">List of cognitive biases</a> and assign design patterns to them? Joshua makes a great start on this.)</p>
<p>For <strong>representational bias</strong> (couldn&#8217;t find a reference), uses <a href="http://www.freshbooks.com/#happyusers">Freshbooks happy users</a> example. They show a &#8216;representative&#8217; selection, showing the ones that resonate with their exact audience. Rather than stock photos, uses real (or at least realistic) ones.<br />
(This seems more related to the bandwagon effect combined with <a href="http://en.wikipedia.org/wiki/Ingroup_bias">Ingroup bias</a> to me?)</p>
</dl>
<div class="mceTemp mceIEcenter">
<dl id="attachment_340" class="wp-caption aligncenter" style="width: 510px;">
<dt class="wp-caption-dt"><a href="http://alastairc.ac/wp-content/uploads/2008/09/freshbooks_happy_users.png"><img class="size-full wp-image-340" title="Freshbook's happy users screen grab." src="http://alastairc.ac/wp-content/uploads/2008/09/freshbooks_happy_users.png" alt="Freshbook's happy users screen grab." width="500" height="380" /></a></dt>
</dl>
</div>
<dl>Review of the day on <a href="http://www.yelp.com/">yelp.com</a>, the chosen users are always the &#8216;best&#8217;, people that do a lot on the site. Power users. By showing that, they show the desired behaviour. This should attract those people interested in doing the same, and perhaps put off people who aren&#8217;t.</p>
<p><a href="http://en.wikipedia.org/wiki/Loss_aversion">Loss aversion</a>, e.g. Few people would take a 50% chance of loosing / gaining £100. At 3:1, there is a much better response.</p>
<p>&#8220;Losses loom larger than gains&#8221;.<br />
Therefore make sure people gain <strong>before</strong> they lose something, e.g. personal data. Netvibes frame the registration as &#8220;login to save your page.&#8221; I.e. not loosing information.</p>
<p>OpenID feature, framed as &#8216;don&#8217;t forget another password&#8217;.<br />
Rather than call something &#8216;save time, create an account&#8217;, frame as not loosing something.<br />
E.g. &#8220;don&#8217;t lose the ability to track your package.&#8221;</p>
<p>Ownership bias: people value things more when they fell a sense of ownership.<br />
(I think this is a weak example based on copy: <em>you</em>tube, <em>my</em> hotel etc. Flickr has lots of &#8220;you&#8221;s. I&#8217;m not convinced about that as the whole you/me thing can cause usability issues, but it could certainly apply to keeping people on sites when they have created / uploaded something, which is covered later.)</p>
<p>Sign up problem effect (the 9x effect): People value current software about 3 times as much as a theoretical real value. Software makers tend to overvalue their products by about 3 times. Therefore a product has to be 9 times better to actually convert people.<br />
From &#8216;<a href="http://www.hbsp.harvard.edu/hbsp/hbr/articles/article.jsp?articleID=R0606F&amp;ml_action=get-article&amp;print=true">Eager Sellers and Stony Buyers</a>&#8216;.</p>
<p>Websites now can get you engaged and creating something before asking for any sign up. This creates an instant feeling of ownership.</p>
<p><a href="http://www.geni.com/">Geni</a> gets you started very quickly, just three bits of information and you have the start of a family tree that you can share.</p>
<p>Freshbooks uses every sign-up tactic possible:</p>
<ul>
<li>bandwagon (thousands of new users)</li>
<li>features and benefits</li>
<li>why it&#8217;s better than you current product</li>
<li>they explain what it is immediately</li>
<li>provides a telephone number</li>
<li>shows where freshbooks is used (with a world map)</li>
<li>shows feedback</li>
<li>shows more happy users with quotes</li>
<li>has a tour</li>
<li>highlights free registration</li>
</ul>
<h3>Questions</h3>
<dl>
<dt>Isn&#8217;t this evil?</dt>
<dd>Absolutely, that&#8217;s a great question. Depends on business ethics really. Trying to provide a win-win. If you provide a better solution, your making the world a better place. However, getting into psychology is what casinos do, e.g. people still sign up for cards etc.</p>
<p>Even when we are aware of cognitive bias, we are still susceptible (see <a href="http://en.wikipedia.org/wiki/Bias_blind_spot">Blind spot bias</a>).</p>
</dd>
<dt>Regarding the e-commerce checkout without an account signup, where was the stat from?</dt>
<dd>A major US retailer gained 10-20% from allowing people to checkout without signing up, but I can&#8217;t name names.</p>
</dd>
<dt>What doesn&#8217;t work internationally?</dt>
<dd>I have no idea, great question.</dd>
<dd>(Comment from the audience) Regarding International applicability, things like youtube/myspace are less relevant to asian societies than western societies.</dd>
<dd>Great point, now you mention it, it&#8217;s mostly about strength of bias in different societies. It will vary.</dd>
<dt>Can you reconcile Freshbooks Direct Marketing style approach, vs slide, which is less &#8216;full on&#8217;? Is there a heuristic for when you&#8217;ve gone too far?</dt>
<dd>There is a danger of trying to automate too much, if people don&#8217;t know what&#8217;s going on, there could be an issue. It&#8217;s a very contextual question, each case is different.</p>
<p>In the workshop yesterday, we mentioned that some sites start you instantly, some don&#8217;t. There is a trade-off where a screen describing what&#8217;s going on could be more important.</p>
<p>What most designers don&#8217;t think about is the <strong>behaviour change</strong> that happens when you use a new bit of software. Habits and behaviour change can be huge, so you want to minimise that.</p>
<p>I read that google was so successful because you didn&#8217;t have to change your behaviour. But another site can copy that&#8230;</p>
</dd>
</dl>
<h2 id="designing-for-interaction"><a href="http://www.slideshare.net/dburka/designing-for-interaction-presentation">Designing for interaction</a>, <a href="http://deltatangobravo.com/"><cite>Daniel Burka</cite></a></h2>
<p>Daniel is Creative director of Digg, and co-founder of Pownce.</p>
<p>Makes point around the effects that large crowds (e.g. for baseball), and the infrastructure around it. That&#8217;s what we are doing, building the infrastructure to allow people to do similar things.</p>
<h3>Challenges for social design</h3>
<dl>
<dt>Challenge 1: Getting signups.</dt>
<dd>Encouraging people to participate.</p>
<p>Percentage of people that &#8216;view&#8217; is much greater than participants. Need to increase benefit, go beyond altruistic motivations. Tap into self-interest.</p>
<p>Therefore, in digg they&#8217;ve added a <strong>recommendation engine</strong>. It takes your activity (digging, burying), compares it to others, and makes recommendations based on that. The more you tell the system, the better it can be.</p>
<p>There might be 16000 stories in 24 hours, so boiling it down to the dozen you&#8217;re interested in is tricky. Therefore this recommendation (personalisation) is very useful. The more you do, the better it gets, and the messages on the site reflect this.</p>
<p>Reduce barrier to entry. Currently Digg pops-up a dialogue when you need to login. The next version will allow you to login via other social sites, like Facebook. Put those details on, and it takes the details from there.</p>
<p>Let people Dip a toe in the water. Get going quickly, get invested quickly.<br />
Geni (overlapping with previous pres), is possibly the best of it&#8217;s kind.<br />
They show you what it is, you only have to put in 3 things, and you are started.<br />
Once you get to the next step, you&#8217;ve got something already.</p>
</dd>
<dt>Challenge 2: Encouraging positive behaviours. </dt>
<dd><strong>Personal profiles</strong>, gives you sense of trust, and creates trackable connections.<br />
Silverorange intranet was something I was involved in many years ago, uses avatars, and this makes it quite emotional for the users.</p>
<p>Last.fm, mixes info from user (name, sites like tumblelog), also your music taste, recently listened to. The digg profile page does this as well, you don&#8217;t have to do anything beyond normal usage to keep it up to date.<br />
In pownce, we link to other profiles. Uses info for other sites.</p>
<p><strong>Focus on tension points</strong>. Copy and design can go a long way.<br />
If a particular place in the site is a tension point, focus on that. Getsatisfaction has a good interface for this, where you can show how you feel about something when adding a comment. The reason for being on the site is probably negative, in GS, they have the faces to show emotional state.<br />
Makes it explicit, &#8220;dorky as hell&#8221;, but it works. Simple to do, but has a big effect.</p>
<p><strong>Avoid negative competition</strong>. Kind of the hill contests don&#8217;t work. The system on Digg listed the users by how many stories got to the homepage. Self-fulfilling prophecy, and new users couldn&#8217;t get on the list. The system encouraged bad behaviour, people tried to game it. With critical mass, the feature went from encouraging to negative.</p>
</dd>
<dt>Challenge 3: Allow for flexible participation.</dt>
<dd><strong>Allow for niche</strong>, allow for small participation, <strong>allow for huge contributions</strong>, it&#8217;s a difficult challenge and no one has cracked it. We need to adapt to different data, volume and frequency.</p>
<p>E.g. use benjamin roethlisberger, who has a really long last name. Uses him as the example guy in designs. Chemists use &#8216;unobtainium&#8217;, which can be anything.</p>
<p>Designers do the same, enter just the right data, perfectly align things etc.<br />
Make sure you enter silly data, use stuff from a myspace profiles etc. It&#8217;ll be more realistic.</p>
<p>Flow, amount of stuff going in. Facebook is quite good at dealing with this.<br />
It tries to determine what you think is interesting. However, you&#8217;re never sure if you&#8217;re friends receive things, as they may not see it in their feed. A preferences pain like facebook uses is a bit of a crutch, but I&#8217;m not sure what the best solution is.</p>
<p><strong>Follow trails</strong>, paving the cow paths.</p>
<p>Don&#8217;t be afraid to adapt to your users.</p>
<p>Pownce thought files would be biggest thing, but actually links was the biggest thing, by far.</p>
<p>Then adapted by sucking in video to display directly, and even created oEmbed to enable that more easily.</p>
<p>The comment system has evolved greatly, even used to have threaded comments as they thought Digg was big enough, and because people started using the @notication to reply to other people. Pownce has smaller conversations, and they concluded that it wasn&#8217;t useful there.</p>
</dd>
</dl>
<h3>Questions</h3>
<dl>
<dt>Question on progressive registration, is that good thing?</dt>
<dd>Can be strange, you can end up with quasi accounts. Not very conformable with that, prefer the linkedin style &#8220;you&#8217;re 30% complete&#8221;.</dd>
<dt>Do you have release cycles?</dt>
<dd>We used to do changes on the spot, now we have a roughly 30 day cycle. Wouldn&#8217;t want to loose the advantage of making small adjustments quickly.</dd>
<dt>Do you do user testing?</dt>
<dd>Mark Trammle can give you the in depth answer. However, we&#8217;re getting better at it, we used to do quick and dirty, partly task-analysis testing.</p>
<p>Now we do focus group testing at start of project, then do user testing with paper prototypes or comps, then do task based testing towards the end.</p>
<p>Every time we just do a little bit, it&#8217;s been worth it, finding obvious problems that hadn&#8217;t been that obvious to us before.</p>
</dd>
</dl>
<h2 id="social-network-portability"><a href="http://tantek.com/presentations/2008/09/social-network-portability/">Social network portability</a>, <a href="http://tantek.com/"><cite>Tantek Çelik</cite></a></h2>
<p>I didn&#8217;t takes notes on Tantek&#8217;s, he&#8217;s always very good at doing comprehensive presentations and publishing them (the link is in the heading).</p>
<h2 id="designing-for-coral-reef">Designing for the coral reef, <a href="http://www.blackbeltjones.com/"><cite>Matt Jones</cite></a> and <a href="http://www.hackdiary.com/"><cite>Matt </cite><strong class="fn">Biddulph</strong><cite></cite></a></h2>
<p>Will do an experiment, download &#8216;neo-readder&#8217;, for iPhones, N series Nokia phones and others.</p>
<p>Yay: not invented here! Something of a Dopplr motto.</p>
<p>What we do with computers in general: We make models, e.g. spreadsheets, and manipulate things to see how we make things better.</p>
<p>(Shows model of all space time!) notes it may change next week with the <a href="http://www.lhc.ac.uk/">LHC</a>.</p>
<p>Dopplr is a &#8220;social physics engine&#8221;, a piece of software that underlines the physics of the world, how things behave. It&#8217;s kind of a middleware as a website.</p>
<p>Shows a graph of enzymes showing the increased interaction due to the catalyst, Dopplr intends to be something that increases the effect of the parts.</p>
<p>Show a picture of Jon Postel, famous for his <q title="Wikipedia source" cite="http://en.wikipedia.org/wiki/Jon_Postel#Postel.27s_Law">be conservative in what you send, be liberal in what you receive</q>, something they take to heart.</p>
<p>Coral reef as a metaphor: Dave Winer made this comparison initially, and they show some imaginary outlining it as both an infrastructure and an animal.</p>
<p>From the coral reef diagram, we are tropic level 2!</p>
<p>Web 2.0: It&#8217;s an arc of history, with connected computers. In the early days people used mainframes with time sharing. You would get economies of scale, and the individuals benefit.</p>
<p>Then we got into the personal computing era.</p>
<p>Then with sites like Flickr, it widens out again. With the internet, and the data oriented uses of it, Flickr is a mainframe, and using the economies of scale.</p>
<p>See also Tom Coate&#8217;s, <a href="http://plasticbag.org/files/native/">native to the web of data</a>.</p>
<p>We design for other sites, re-use of data. Sites that open up, are themselves benefiting.<br />
Matt Webb: <q>Your web service is a finite state machine that operates on your users</q>.</p>
<p><a href="http://mike.teczno.com/">Michal Migurski</a>. Doing stuff with maps and lots of data. They started wtih google maps. But started creating open source map frameworks, e.g. <a href="http://mike.teczno.com/#modest-maps">modest maps</a>, <a href="http://mapnik.org/">mapnic</a>.</p>
<p>&#8220;Slippy maps&#8221;, like Google&#8217;s, are more like games, where you can slip through. They divide the world into discrete chunks, then stream them. It&#8217;s like looking at a blue whale through a letter box.</p>
<p>From a game design article, they make valiant efforts to avoid landing screens. This is a lot like web 2.0 stuff, where you try and stream things in as you go along. There are a lots of places on Dopplr where we use that.</p>
<p>The long zoom, designing a distributed interwoven identity.<br />
The genius of a coke bottle is that if it smashes into a thousand pieces you still know what it is. <q>Because details are so hard to get right, they are hard to duplicate.</q><br />
Ideas aren&#8217;t going to win, it&#8217;s going to be the execution, the details.</p>
<p>Dopplr was an idea, and then they later realised the scope of what we could do technically.</p>
<p>Another word: delighter, a word from the W hotels in new york, where you put something into their experience (in their room). If you go in and there&#8217;s a rubber duck, it&#8217;s an &#8220;eh&#8221; moment. If, on your second day, after shopping and being knackered, and you find a rubber duck, it&#8217;s a delightful moment.</p>
<p>In Dopplr, the colours change based on your location. It takes ages, people tend to notice after a month or so.  Then you notice it in the favicon!</p>
<p>We wanted to put in data toys, e.g. delighters. Personal velocity works out how far you&#8217;ve travelled in a year, and works out how far you&#8217;ve travelled in a year. Turned them into things, we &#8216;equivelised&#8217; (TM) these into an animal. We tried animals, it took a while to work out how fast animals move (Wikipedia isn&#8217;t that great for this sort of query!).</p>
<p>The fastest person on dopplr is going the speed of a whippet, but many are very slow. The nasa transporter and a glacier were good equivalents. We have the fail snail, a fail whale equivalent we hope you never see.</p>
<h3>Building distributed interwoven system</h3>
<p>In Dopplr, as well as the cache, it&#8217;s very important to use asynchronous services.<br />
There are many services surrounding central Dopplr, and then the 3rd parties are outside of that.</p>
<p>You need to be playing with asynchronous systems now, <a href="http://xph.us/software/beanstalkd/">Beanstalkd</a>, <a href="http://activemq.apache.org/camel/asynchronous-processing.html">Apache Caramel</a>. These systems move at different speeds, you need to be flexible and allow for that.</p>
<p>Jeremy Keith showed the <a href="http://adactio.com/journal/1496/">chain reaction of updating fire eagle</a>, then Dopplr, Pownce etc.</p>
<p>Shows a diagram of the current schema around other sites such as friendfeed and facebook.</p>
<p>Dopplr is an example of a site that can be successful without people visiting it.<br />
There is a lot to be gained by sending people away from your site, and Google has demonstrated that this isn&#8217;t always a business problem.</p>
<p>However, it can be a bit like choosing hi-fi separates, where you try and optimise the overall by using different pieces. It can get too complicated!</p>
<p>They have open sourced some of the routines, like social network imports, search github for Dopplr. (I couldn&#8217;t find anything through github&#8217;s search, using google I found <a href="http://github.com/mattb/identity-matcher/tree">Identity matcher</a>, <a href="http://github.com/mattb">Matt&#8217;s profile</a> may be better.)</p>
<p>Social network subscription will be next, so things automatically update across sites.</p>
<p>The big challenge is the interactions with the user. Dopplr is careful to be contextual, we won&#8217;t automatically import things etc.<br />
Your Linkiedin set of people is not the same as you network on facebook. (This is an important point, it will have to be quite )</p>
<p>We added public profile support a while back, and have been adding more and more toys, e.g. personal velocity. Coded it to be embedded as a blog badge etc.  They are <a href="http://code.google.com/apis/opensocial/">open social applications</a>. So if another site supports Open Social they can embed it. Uncoordinated collaboration.</p>
<p>Twitter: You can send messages to Dopplr through that, or email about it, and then it updates dopplr.</p>
<p>It&#8217;s an announcement, an instruction to other things.<br />
However, it does depend on language parsing. We&#8217;ve built up the top 1000 destinations, but also had to build a &#8216;stop list&#8217; of the <a href="http://blog.dopplr.com/2008/08/15/a-dopplr-puzzle-the-answer/">common words in emails that are also town names</a>, e.g. conference.</p>
<p>Just released groups, which get quite a few features of the individual pages. For example, the <a href="http://www.dopplr.com/group/dconstruct/public">Dconstruct goup</a>.<br />
Even a group carbon footprint calculator, which should be popular for CSR.</p>
<p>It used to be that you could only get anything once logged in.<br />
Just done &#8220;share this trip&#8221;, you can get a guest pass URL to share with people to access that trip only.<br />
As a non-user, you get a small view.</p>
<p>Experiment: Share a trip, showed a barcode, but unfortunately no ones phone could get it.</p>
<h3>&lt;rant&gt;</h3>
<p>Merlin Mann on <a href="http://www.43folders.com/2008/08/26/pause-button">the case for a pause button</a>: against the fake follow fucntion on friendfeed.</p>
<p>The fake friend function on friendfeed may be very clever, but the fact that there are fake friends shows a problem. Matt talks about the pause button on social sites (see the Merlin Mann article).</p>
<p>My take: friending considered harmful. We are tying ourselves in knots because of the language. Using the word friend makes it necessary to contort yourself.<br />
Don&#8217;t use friends, talk about the actions, trust etc, not friends.<br />
Plausible deniability of friendfeed makes you jump through a lot of hoops.<br />
Shows pic of US politician with a shotgun.</p>
</dl>
<h2 id="system-of-the-world">The System Of The World,<br />
<a href="http://adactio.com/">Jeremy Keith</a></h2>
<p>This I didn&#8217;t even try and take notes about. This was less a presentation and much more of a performance, the presentation and MP3 will be available soon, the <a href="http://adactio.com/articles/1508/">text is available now</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://alastairc.ac/2008/09/dconstruct-2008-notes/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Strange sIFR / screen-reader bug</title>
		<link>http://alastairc.ac/2008/07/strange-sifr-screen-reader-bug/</link>
		<comments>http://alastairc.ac/2008/07/strange-sifr-screen-reader-bug/#comments</comments>
		<pubDate>Fri, 25 Jul 2008 15:15:26 +0000</pubDate>
		<dc:creator>AlastairC</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[Front-end code]]></category>
		<category><![CDATA[PDF / Flash]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[screenreader]]></category>
		<category><![CDATA[sIFR]]></category>
		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://alastairc.ac/?p=325</guid>
		<description><![CDATA[<img class="alignleft size-full wp-image-326" title="sIFR logo." src="http://alastairc.ac/wp-content/uploads/2008/07/logo_sifr2.gif" alt="" width="192" height="116" />I was writing a little accessibility article for .net magazine about text-replacement techniques, including sIFR. I was blithely saying that "yea, don't worry, it's fine" with a couple of caveats. But, rather than rely on memory I did a quick test, and discovered something strange.]]></description>
			<content:encoded><![CDATA[<p><a href="http://alastairc.ac/wp-content/uploads/2008/07/logo_sifr2.gif"><img class="alignleft size-full wp-image-326" title="sIFR logo." src="http://alastairc.ac/wp-content/uploads/2008/07/logo_sifr2.gif" alt="" width="192" height="116" /></a>I was writing a little accessibility article for .net magazine about text-replacement techniques, including sIFR. I was blithely saying that &#8220;yea, don&#8217;t worry, it&#8217;s fine&#8221; with a couple of caveats. But, rather than rely on memory I did a quick test, and discovered something strange.</p>
<p>Bob Easton has a useful <a href="http://access-matters.com/testcases/tc1-1-4.html">test case page</a>, with which I tried in everything I had to hand:</p>
<ul>
<li>Firefox 3 with zoom, and regular text-size changes.</li>
<li>Safari 3 with text-size changes.</li>
<li>IE 6 &amp; 7.</li>
<li>Opera 9.5.</li>
<li>JAWs with IE7.</li>
<li>Windows Eyes with IE7.</li>
<li>VoiceOver 2.0 with Safari.</li>
</ul>
<p>The image replacement techniques were generally fine with a couple of small bugs, most of which don&#8217;t appear on <a href="http://www.mezzoblue.com/tests/revised-image-replacement/">Mezzoblue list</a>. Having them as links seems to be problem, and increased font size does seem to be an issue for the Gilder/Levin method unless you start with a small text size.</p>
<h2>Problem</h2>
<p>When I got to the sIFR method (scalable Inman Flash Replacement), the Windows based screen readers read out the heading twice. I also checked on the <a href="http://www.mikeindustries.com/blog/files/sifr/2.0/">official example page</a> as well, just to be sure it wasn&#8217;t an old example.</p>
<p>Things may have changes since the sIFR method was introduced, but now most Windows based screen readers (i.e. not VoiceOver) are quite happy to read out the Flash. You get something like:</p>
<blockquote title="JAW 8.0 read out of the test case."><p>Flash movie start.<br />
Heading level 3, scalable Inman Flash Replacement.<br />
Flash movie end.<br />
Heading level 3, scalable Inman Flash Replacement.</p></blockquote>
<h2>Solution?</h2>
<p>There are two broad ways around it:</p>
<ol>
<li>Hide the Flash content from screen readers.</li>
<li>Hide the &#8216;hidden&#8217; content from screen readers.</li>
</ol>
<p>I did try (and succeed) in creating an example that hides the actual text from the screen reader, but that&#8217;s probably the wrong way to go.</p>
<p>Given that there are still quite a few user-agents (e.g. VoiceOver) that don&#8217;t cope with Flash, it would be better to leave the text as available as it is, and make the Flash inaccessible. I assume setting <code>wmode</code> to transparent would do that, wouldn&#8217;t it?</p>
]]></content:encoded>
			<wfw:commentRss>http://alastairc.ac/2008/07/strange-sifr-screen-reader-bug/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Nested conditional comments</title>
		<link>http://alastairc.ac/2008/05/nested-conditional-comments/</link>
		<comments>http://alastairc.ac/2008/05/nested-conditional-comments/#comments</comments>
		<pubDate>Mon, 12 May 2008 21:07:53 +0000</pubDate>
		<dc:creator>AlastairC</dc:creator>
				<category><![CDATA[Front-end code]]></category>
		<category><![CDATA[Conditional Comments]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[ie]]></category>

		<guid isPermaLink="false">http://alastairc.ac/?p=302</guid>
		<description><![CDATA[In a recent test with Internet Explorer's conditional comments, some of the more complex operators didn't seem to work. For example, trying to target IE 6 and 7 defensively, the 'and' operator didn't work. However, there is another solution.]]></description>
			<content:encoded><![CDATA[<p class="update"><ins datetime="2008-05-15T09:28:05+00:00">It looks like the issue below was actually down to caching &#8211; Doh! The and/or operators work fine in IE 5.5 through 8, and will be what we are using. I&#8217;ll leave this post here to point out that they are quite useful, especially if you are leaving IE&lt;6 with basic styles.</ins></p>
<p>In a recent test with <a href="http://msdn.microsoft.com/en-us/library/ms537512.aspx">Internet Explorer&#8217;s conditional comments</a>, some of the more complex operators didn&#8217;t seem to work. For example, trying to target IE 6 and 7 defensively, this &#8216;and&#8217; operator should work:</p>
<pre><code>&lt;!--[if (gte IE 6)&#038;(lt IE 8)]&gt;
    [import this style sheet]
&lt;![endif]&ndash;&ndash;&gt;</code></pre>
<p>However, that didn&#8217;t seem to work when testing in virtual machines, only the first part did. It was the same for the &#8216;or&#8217; version as well, it just counted as greater than or equal to Internet Explorer 6.</p>
<p>Since we can&#8217;t <a href="/2006/05/conditional-comments-in-css/">move CSS based conditional comments into the CSS</a>, what did work in our testing was this slightly inelegant nested version:</p>
<pre><code>&lt;!--[if lt IE 8]&gt;
    &lt;![if gte IE 6]&gt;
        [import this stylesheet.]
    &lt;![endif]&gt;
&lt;![endif]&ndash;&ndash;&gt;</code></pre>
<p>Can anyone else replicate this? I&#8217;ve a quick <a href="/testing/ie_cc_operators_test.html">test page</a> to see if you can point a 5.5 / 6 / 7 / 8 IE browser at it.</p>
]]></content:encoded>
			<wfw:commentRss>http://alastairc.ac/2008/05/nested-conditional-comments/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Where SEO and accessibility collide</title>
		<link>http://alastairc.ac/2008/05/where-seo-and-accessibility-collid/</link>
		<comments>http://alastairc.ac/2008/05/where-seo-and-accessibility-collid/#comments</comments>
		<pubDate>Thu, 08 May 2008 09:41:39 +0000</pubDate>
		<dc:creator>AlastairC</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[Front-end code]]></category>
		<category><![CDATA[SEO]]></category>

		<guid isPermaLink="false">http://alastairc.ac/?p=301</guid>
		<description><![CDATA[Recently a link to a Search Engine Optimisation (SEO) cheat sheet came across my radar, and I was curious what sort advice is given for SEO these days. I'm not an SEO expert, but I thought a short analysis of how SEO and accessibility overlap or conflict would be useful.]]></description>
			<content:encoded><![CDATA[<p>Recently a link to a <a href="http://www.seomoz.org/blog/the-web-developers-seo-cheat-sheet">Search Engine Optimisation (SEO) cheat sheet</a> came across my radar, and I was curious what sort advice is given for SEO these days. I&#8217;m not an SEO expert (although my sites seem to do pretty well for the number of links to them), but I thought a short analysis of how SEO and accessibility overlap would be useful.</p>
<p>The cheat sheet is from <a href="http://www.seomoz.org/">seomoz.org</a>, and as a fan of cheat sheets in general, I immediately downloaded it. Some of the advice directly contributes to an accessible site (which is something many have noted before), but a couple of items will impact on the experience for people using particular technologies.</p>
<h2 id="the good">The good (for accessibility)</h2>
<p>Much of the advice is also good for accessibility. For example, keeping the number of links on a page to under 100 can help not scare screen reader users, redirects should be done server-side, and site URLs should be readable and consistent.</p>
<p>The syntax of the page title is recommended as <q>Keyword &lt; Category | Website title</q>, which is pretty close to what we recommend. (We tend to put the category / section at the end, as usage in browser bookmarks, tabs and history means that the second most important information is the site.)</p>
<p>The <q>Common Robot Traps</q> tend to align closely with accessibility as well, where frames, forms and sessions are highlighted as potential issues.</p>
<p>It also highlights the use of the <strong>sitemap XML</strong> file, which would be a useful thing for access technologies to pick up on and use as a navigation mechanism. It would allow things like listing recently changed pages (if the site doesn&#8217;t itself), and the importance that the site places on particular sections.</p>
<h2 id="html-tags">The conflicting</h2>
<p>Whilst the advice on title (elements), headings and bold/strong are good accessibility wise, a couple of the recommendations do conflict. The main thing is that the attribute use suggested does not seem to help people:</p>
<ul>
<li>Stuffing keywords into alt text is unlikely to be a valid description of an image.</li>
<li>Adding titles to text links (especially if they are just keywords) has little meaning to people, and is likely to get in the way for people using screen magnifiers.</li>
<li>Using keywords as link text <em>might</em> give you an indication of the destination, but that isn&#8217;t the advice I would want to be taken.</li>
</ul>
<p>For link text, I generally advise that it should match the main heading of the target page, which I believe aligns with SEO fairly well, alhtough I guess it depends on whether keywords are used.</p>
<p>As an SEO specific cheatsheet, it is doing what it is supposed to. However, I wouldn&#8217;t give it to a developer or content author without the caveat that keywords should be included where applicable, that is not the purpose of those attributes. (And just skip the title attribute on text links.)</p>
]]></content:encoded>
			<wfw:commentRss>http://alastairc.ac/2008/05/where-seo-and-accessibility-collid/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Galleries in WordPress 2.5</title>
		<link>http://alastairc.ac/2008/04/galleries-in-wordpress-25/</link>
		<comments>http://alastairc.ac/2008/04/galleries-in-wordpress-25/#comments</comments>
		<pubDate>Sun, 20 Apr 2008 18:43:05 +0000</pubDate>
		<dc:creator>AlastairC</dc:creator>
				<category><![CDATA[Accessibility]]></category>
		<category><![CDATA[Front-end code]]></category>
		<category><![CDATA[bugs]]></category>
		<category><![CDATA[gallery]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[WYSIWYG editors]]></category>

		<guid isPermaLink="false">http://alastairc.ac/?p=283</guid>
		<description><![CDATA[<img src="/wp-content/uploads/2008/04/05-post-gallery-150x150.png" alt="The gallery example as published, showing the 6 example pictures." title="Default gallery." width="150" height="150" class="alignleft size-thumbnail wp-image-288" />The recent (and quite significant) overhaul of Wordpress' admin area is very good, streamlining your blogging and making previously diffiicult things quite simple. One of the new features is the ability to automatically create a gallery within a post of all the picture uploaded to that post. I wasn't very happy with the code output for galleries, so I took it apart and tried to improve it.]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft size-thumbnail wp-image-288" title="Default gallery." src="http://alastairc.ac/wp-content/uploads/2008/04/05-post-gallery-150x150.png" alt="The gallery example as published, showing the 6 example pictures." width="150" height="150" />The recent (and quite significant) overhaul of <a href="http://wordpress.org/">WordPress</a>&#8216; admin area is very good, streamlining your blogging and making previously diffiicult things quite simple. They are suffering from a slight case of the <a href="http://en.wikipedia.org/wiki/Ribbon_(computing)#Controversy">Office Ribbon</a> (users not happy with the learning curve for a demonstrably better interface), but overall it is a big improvement.</p>
<p>One of the new features is the ability to automatically create a gallery within a post of all the picture uploaded to that post. I wasn&#8217;t very happy with the code output for galleries, so I took it apart and tried to improve it.</p>
<h2>Current process</h2>
<p>To see how it works now, I uploaded a few photos, and included titles, captions, and descriptions in a way that I could see how they came out. I tend to have lots of windsurfing pictures lying around, so I picked half a dozen from an event last year to test with.</p>
<p>This is what you get after selecting a few files.</p>
<p><a href="http://alastairc.ac/wp-content/uploads/2008/04/01-file_upload.png"><img class="alignnone size-full wp-image-284" title="Initial file upload" src="http://alastairc.ac/wp-content/uploads/2008/04/01-file_upload.png" alt="Example of the media interfaces, with 6 pictures uploaded to the page library." /></a></p>
<p>Once in, you can add the alternative text, a title, and longer description.</p>
<p><a href="http://alastairc.ac/wp-content/uploads/2008/04/03-picture-edit.png"><img class="aligncenter size-full wp-image-286" title="Item interface." src="http://alastairc.ac/wp-content/uploads/2008/04/03-picture-edit.png" alt="Example of the item interface with one picture showing." width="500" height="385" /></a></p>
<h3>Inserting a single image into post</h3>
<p>The code produced by simply inserting an image into the post is:</p>
<pre><code>&lt;p&gt;&lt;a href="/path/_b5m1617-01.jpg"&gt;
&lt;img class="alignleft size-thumbnail wp-image-289"
title="Title - Formula sailor speeding across the course."
src="/path/_b5m1617-01-150x150.jpg"
alt="Caption - Joe Bloggs"
width="150" height="150" /&gt;
&lt;/a&gt;&lt;/p&gt;</code></pre>
<p>Not bad, the title is added as a title, the &#8216;caption&#8217; is the alternative text. I&#8217;m not sure if the standard use would need a title and caption, why not just use &#8216;title&#8217; and use that as the alt? (As mentioned in the <a href="http://alastairc.ac/2006/10/wysiwyg-editor-spec-images/">images part of my WYSIWYG spec</a>.) Still, it&#8217;s a nice implementation of having a longer description, as it creates a page for each item.</p>
<h3>Adding a gallery</h3>
<p>Adding a gallery is pretty easy: press the button. It doesn&#8217;t add in the pictures into the editor, it simply adds a bit of text for <code>gallery</code> (in square brackets). The advantage to this approach is that how galleries are dealt with from a code point of view is handled when the page is rendered in PHP, rather than hard-coded by the TinyMCE editor.</p>
<p>However, the code when previewing the page is <em>not</em> what I had hoped for:</p>
<pre><code>&lt;style type='text/css'&gt;
.gallery {
margin: auto;
}
.gallery-item {
float: left;
margin-top: 10px;
text-align: center;
width: 33%;			}
.gallery img {
border: 2px solid #cfcfcf;
}
.gallery-caption {
margin-left: 0;
}
&lt;/style&gt;

&lt;p&gt;	&lt;!-- see gallery_shortcode() in wp-includes/media.php --&gt;&lt;/p&gt;
&lt;div class='gallery'&gt;
&lt;dl class='gallery-item'&gt;
&lt;dt class='gallery-icon'&gt;
&lt;a href='path/_b5m1617-01/'
title='Title - Formula sailor speeding across the course.'&gt;
&lt;img src="path/_b5m1617-01-150x150.jpg" width="150"
height="150" class="attachment-thumbnail" /&gt;&lt;/a&gt;
&lt;/dt&gt;
&lt;dd class='gallery-caption'&gt;
Caption - Joe Bloggs
&lt;/dd&gt;
&lt;/dl&gt;
&lt;dl class='gallery-item'&gt;
&lt;dt class='gallery-icon'&gt;
&lt;a href='path/_b5m1622-01/'
title='_b5m1622-01'&gt;&lt;img
src="path/_b5m1622-01-150x150.jpg"
width="150" height="150"
class="attachment-thumbnail" /&gt;&lt;/a&gt;
&lt;/dt&gt;
&lt;/dl&gt;
&lt;!-- more lists for for each picture --&gt;

&lt;p&gt;&lt;br style="clear: both" /&gt;&lt;br /&gt;
&lt;br style='clear: both;' &gt;
&lt;/div&gt;
</code></pre>
<p>Ok, so the main problems here are:</p>
<ul>
<li>Inline styling embeded into the page content.</li>
<li>Invalid HTML. Open paragraphs tags without closing paragraph tags.</li>
<li>Classitus, with each item being given a class, rather than using inheritance. (It is fair enough to put a <code>div</code> with a class around it, but it should just be plain HTML under that.)</li>
<li>No alternative text on the image.</li>
<li>Each item is created with a list, a single item in each definition list. (A definition list is a slight stretch, but it would be ok if it was one list.)</li>
</ul>
<p>It looks ok in my theme:</p>
<p><a href="http://alastairc.ac/wp-content/uploads/2008/04/05-post-gallery.png"><img class="aligncenter size-full wp-image-288" title="Default gallery." src="http://alastairc.ac/wp-content/uploads/2008/04/05-post-gallery.png" alt="The gallery example as published, showing the 6 example pictures." width="499" height="425" /></a></p>
<p>But I was unhappy enough with the code to start looking at how to change it.</p>
<h2>Altering the Gallery code</h2>
<p>The code itself gave me directions as to where to look, <q>see gallery_shortcode() in wp-includes/media.php</q>. This shows:</p>
<pre><code>// Allow plugins/themes to override the default gallery template.
$output = apply_filters('post_gallery', '', $attr);</code></pre>
<p>I looked into <a href="http://codex.wordpress.org/Writing_a_Plugin">writing a pluggin</a> that used a filter to override this, but either I just didn&#8217;t get it (very possible, I&#8217;m not a programmer) or the gallery aspect is too new to be documented yet. Also, my understanding of the filters is that it changes the output, but I also want to include something that is missing &#8211; alt text.</p>
<p>I copied across the entire function, and two others that it relies on, into a plugin that overrides the shortcodes function set for the gallery.</p>
<p>I cut out the style tags, and adjusted it so the same gallery outputs this:</p>
<pre><code>&lt;ul class='gallery'&gt;
&lt;li&gt;&lt;a href='path/_b5m1617-01.jpg'&gt;
&lt;img src="path/_b5m1617-01-150x150.jpg"
width="150" height="150"
alt="Caption - Joe Bloggs" /&gt;
&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href='path/_b5m1622-01.jpg'&gt;
&lt;img src="path/_b5m1622-01-150x150.jpg"
width="150" height="150"
alt="" /&gt;&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;br class='cl' /&gt;&lt;/p&gt;
</code></pre>
<p>It takes a little styling in your own CSS, but this is much better, more basic code. It looks pretty much the same, but it will drop to two columns if you are on a smaller screen.</p>
<p>If I could work out how, I would make it so that the title is added within each list item, so you would have:</p>
<pre><code>&lt;li&gt;
&lt;a&gt;&lt;img&gt;&lt;/a&gt;
&lt;p&gt;Title&lt;/p&gt;
&lt;/li&gt;</code></pre>
<p>Anyway, if it is of use to you, the extension I created to do this is available: <a href="http://alastairc.ac/code/wp/gallery-code-cleaner.zip">Gallery code clearner plugin</a>. I&#8217;m not going to try and put it on WordPress.org, I&#8217;ll be submitting some bugs so that hopefully this can be changed in WordPress.</p>
<h2>Other little bugs</h2>
<p>Whilst digging around in 2.5, I did find a couple of other bugs:</p>
<ul>
<li>The edit the URL (permalink) aspect is <em>much</em> better than &#8216;page slug&#8217;, but when you click &#8216;save&#8217; next to it, you also have to know to save the post as well, otherwise it doesn&#8217;t take effect.</li>
<li>Titles are added to text navigation, for example, on the category links. This is somewhere between annoying (for regular users), and positively disruptive to people using screen magnifiers.</li>
<li>When adding images, it adds the domain name, I would rather it used an absolute link without the domain name. E.g. <code>/path/to/image.jpg</code> rather than <code>http://domain/path/to/image.jpg</code>.</li>
</ul>
<h2 id="update" class="update">Update:</h2>
<ul>
<li>I wrote up the <a href="/notes/web-applications/wordpress/clean-gallery/">changes I&#8217;d like to see</a>.
<li>
<li>I submitted <a href="http://trac.wordpress.org/ticket/6927">a bug about adding options for galleries</a> in WordPress settings.</li>
<li>I seconded this <a href="http://trac.wordpress.org/ticket/6685">bug about lack of alt text</a> and only using one short-description field in the interface.</li>
<li>I commented on this <a href="http://trac.wordpress.org/ticket/6368">bug about how galleries are displayed</a>, disagreeing with the use of multiple lists of 1.</li>
<li>There is <a href="http://justintadlock.com/archives/2008/04/13/cleaner-wordpress-gallery-plugin">another pluggin for a similar purpose</a> which appears to make the addition of a lightbox easier (although I don&#8217;t think it adds alt text).</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://alastairc.ac/2008/04/galleries-in-wordpress-25/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
		<item>
		<title>Font-based layouts becoming fashionable?</title>
		<link>http://alastairc.ac/2008/02/font-based-layouts-becoming-fashionable/</link>
		<comments>http://alastairc.ac/2008/02/font-based-layouts-becoming-fashionable/#comments</comments>
		<pubDate>Sun, 03 Feb 2008 20:12:18 +0000</pubDate>
		<dc:creator>AlastairC</dc:creator>
				<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Front-end code]]></category>
		<category><![CDATA[font-size]]></category>
		<category><![CDATA[layout]]></category>
		<category><![CDATA[zoom]]></category>

		<guid isPermaLink="false">http://alastairc.ac/2008/02/font-based-layouts-becoming-fashionable/</guid>
		<description><![CDATA[Layouts are becoming an issue again. The (browser) landscape is changing, as are the fashion in layouts, but not really in unison. I can understand giving a greater weight towards design aspects, and maintaining the grid, however, I find the timing curious, as these changes seem likely to be obsolete soon. ]]></description>
			<content:encoded><![CDATA[<p>Layouts are becoming an issue again. The (browser) landscape is changing, as are the fashion in layouts, but not really in unison. Before I continue, I should state that my perspective is not one of a visual designer&#8217;s, so my decisions tend to be weighted towards usability &amp; accessibility.</p>
<h2>EM based layouts becoming more popular?</h2>
<p>Recently <a href="http://www.simplebits.com/about/">Dan Cederholm</a> released his new layout &#8216;<a href="http://www.simplebits.com/notebook/2008/01/31/gridlasticness.html">gridlasticness</a>&#8216;, an EM based layout that expands with your font-size choice.</p>
<p>I&#8217;ve looked at <a href="/2006/05/accessible-layouts/">accessible layouts</a> before, and bemoaned the fact that <a href="/2007/01/elastic-layout-wrong-term/">elastic layouts are mis-named</a>. My main point was that font-based layouts will cause issues for people with visual impairments. When usability testing with people at <abbr title="Royal National Institute of Blind People">RNIB</abbr> centers, a fairly standard setup was an 800 or 1024 width screen, and large fonts.</p>
<p>That means lots of horizontal scrolling. In usability testing I&#8217;ve seen people get really frustrated with horizontal scrolling. Or when they don&#8217;t notice the scrolling, frustrated with trying to do things that should be easy, and are easy if you can see the right side of the screen!</p>
<p>This part of Dan&#8217;s post worries me:</p>
<blockquote cite="http://www.simplebits.com/notebook/2008/01/31/gridlasticness.html" title="Gridlasticness, by Dan Cederholm"><p>Understand that when building an already-wide layout, it’ll get really wide, really fast. That’s OK.  Wide is the new drop shadow.</p>
</blockquote>
<p>If you&#8217;re someone that often needs to adjust your font-size, you&#8217;d be encouraged to tick the &#8220;ignore site&#8217;s font sizes&#8221; setting in IE (or use larger sizing in your prefered browser), and you would immediately get substantial horizontal scrolling:</p>
<p><a href='/wp-content/uploads/2008/02/simplebits_gridlastic.png'><img src='/wp-content/uploads/2008/02/simplebits_gridlastic.png' alt='Simplebits layout when viewed through Firefox 3’s zoom' /></a></p>
<p>I&#8217;m not singling out Dan here, font-based layouts are popping up in quite a few places, such as the new <a href="http://www.odeon.co.uk/">Odeon site</a>. He just happened to draw my attention to it and mention the fashion aspect.</p>
<p>Now, I can understand giving a greater weight towards design aspects, and maintaining the grid (although I wouldn&#8217;t do the same). However, I find the timing curious, as these changes seem likely to be obsolete soon. </p>
<h2>Browser zooming coming of age</h2>
<p>Firefox 3 has a full zoom (rather than text-zoom), and you get pretty much the same effect as the EM based layout. Except that the browser zoom is often better, as (unless it&#8217;s a font-based layout), it can try and fit the page to the viewport.</p>
<p>In a very little testing, Opera&#8217;s version still seems more effective with the fit-to-width option enabled, and of course IE7&#8242;s trails behind with it&#8217;s linear-only zoom. (Side prediction: I suspect that IE8&#8242;s zoom will be better, but not when using IE7&#8242;s rendering.)</p>
<p>The bottom line is, that when these browsers are the mainstream, the differences between pixel and font-sizing becomes academic. Of course, I still find sizing layouts based on the viewport more robust over font or pixels methods, but when browser zooming is standard it will be more difficult to argue.</p>
<p>Ironically <a href="http://web.archive.org/web/20060207024826/http://simplebits.com/">Simplebits old design</a> using percentages works much better with zooming that fits-to width. What&#8217;s the big deal with font-based layouts, what have I missed?</p>
]]></content:encoded>
			<wfw:commentRss>http://alastairc.ac/2008/02/font-based-layouts-becoming-fashionable/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
	</channel>
</rss>
