<?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>fberriman &#187; Web Dev</title>
	<atom:link href="http://fberriman.com/category/web-dev/feed/" rel="self" type="application/rss+xml" />
	<link>http://fberriman.com</link>
	<description>a blog for frances</description>
	<lastBuildDate>Tue, 13 Mar 2012 15:33:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Schema-org, microformats and more science please</title>
		<link>http://fberriman.com/2011/12/01/schema-org-microformats-and-more-science-please/</link>
		<comments>http://fberriman.com/2011/12/01/schema-org-microformats-and-more-science-please/#comments</comments>
		<pubDate>Thu, 01 Dec 2011 18:18:10 +0000</pubDate>
		<dc:creator>Frances</dc:creator>
				<category><![CDATA[Microformats]]></category>
		<category><![CDATA[Web Dev]]></category>
		<category><![CDATA[authoring]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[microdata]]></category>
		<category><![CDATA[schema-org]]></category>
		<category><![CDATA[semantic web]]></category>

		<guid isPermaLink="false">http://fberriman.com/?p=617</guid>
		<description><![CDATA[A normal conversation in the GovUK (or any office I frequent) today went*: &#8220;Can we get some microformats on that page?&#8221;, I suggest as I spot a section of our site outputting a boat-load of addresses. &#8220;No problem &#8211; but what&#8217;s this about schema-org?&#8221;. &#8220;Yeah, yeah.. we can hedge our bets and throw their mark-up [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;padding-right: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ffberriman.com%252F2011%252F12%252F01%252Fschema-org-microformats-and-more-science-please%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2FtLiE7k%22%2C%20%22style%22%3A%20%22small%22%2C%20%22title%22%3A%20%22Schema-org%2C%20microformats%20and%20more%20science%20please%22%20%7D);"></div>
<p>A normal conversation in the <a href="http://twitter.com/govuk">GovUK</a> (or any office I frequent) today went*: &#8220;Can we get some <a href="http://microformats.org">microformats</a> on that page?&#8221;, I suggest as I spot a section of our site outputting a boat-load of addresses.  &#8220;No problem &#8211; but what&#8217;s this about <a href="http://schema.org">schema-org</a>?&#8221;.  &#8220;Yeah, yeah.. we can hedge our bets and throw their mark-up in there too, it&#8217;s just some extra <code>itemprops</code>. <em>*flippant scoff*</em> I&#8217;ll send you a complete snippet example, because I&#8217;m just nice like that.&#8221;</p>
<p>And that&#8217;s what I did.  And it looked like this:</p>
<pre><code>
&lt;div class="vcard" itemscope itemtype="http://schema.org/Organization"&gt;
  &lt;p class="org" itemprop="name"&gt;Department for Transport&lt;/p&gt;
  &lt;p class="adr" itemprop="address" itemscope
itemtype="http://schema.org/PostalAddress"&gt;
    &lt;span itemprop="streetAddress"&gt;
      &lt;span class="extended-address"&gt;Great Minster House&lt;/span&gt;
      &lt;span class="street-address"&gt;76 Marsham Street&lt;/span&gt;
    &lt;/span&gt;
      &lt;span class="locality" itemprop="addressLocality"&gt;London&lt;/span&gt;
      &lt;span class="postcode" itemprop="postalCode"&gt;SW1P 4DR&lt;/span&gt;
  &lt;/p&gt;

    &lt;p&gt;Telephone: &lt;span class="tel"
itemprop="telephone"&gt;0300 330 3000&lt;/span>&lt;/p&gt;
    &lt;p&gt;Website: &lt;a href="http://www.dft.gov.uk" class="url"
itemprop="url"&gt;www.dft.gov.uk&lt;/a&gt;&lt;/p&gt;
    &lt;p&gt;Email: &lt;a
href="mailto:firstname.surname@dft.gsi.gov.uk"
class="email" itemprop="email"&gt;firstname.surname@dft.gsi.gov.uk&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
</code></pre>
<p>Holy massive-code-snippet batman.  I was surprised by the size.  I know, I can feel people digging up links already on attack and defence of &#8220;bloat&#8221; when using microformats alone, but seriously guys, IT&#8217;S HUGE.  I felt guilty saying &#8220;this is what you&#8217;ve gotta add to get this mark-up to <em>mean something</em>&#8220;. Here&#8217;s a more broken down comparison:</p>
<p>Here&#8217;s the address, raw, at just over a tweet&#8217;s worth (167 chars):</p>
<pre><code>
Department for Transport
Great Minster House
76 Marsham Street
SW1P 4DR
Telephone: 0300 330 3000
Website: http://www.dft.gov.uk
Email: firstname.surname@dft.gsi.gov.uk
</code></pre>
<p>Here&#8217;s the address with the elements on it to get at the separate pieces of the address, bringing us up to 356:</p>
<pre><code>
&lt;p&gt;Department for Transport&lt;/p&gt;
&lt;p&gt;
  &lt;span&gt;Great Minster House&lt;/span&gt;
  &lt;span&gt;76 Marsham Street&lt;/span&gt;
  &lt;span&gt;London&lt;/span&gt;
  &lt;span&gt;SW1P 4DR&lt;/span&gt;
&lt;/p&gt;

&lt;p&gt;Telephone: 0300 330 3000&lt;/p&gt;
&lt;p&gt;Website: &lt;a href="http://www.dft.gov.uk"&gt;www.dft.gov.uk&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Email: &lt;a href="mailto:firstname.surname@dft.gsi.gov.uk"
&gt;firstname.surname@dft.gsi.gov.uk&lt;/a&gt;&lt;/p&gt;
</code></pre>
<p>Now let&#8217;s throw some classes on to those and get a bit of meaning in there (I mean, you may want to style them up, get things on new lines etc etc. so using the microformat classes are handy for that alone.**). We&#8217;ve got a vCard, people!  (565):</p>
<pre><code>
&lt;div class="vcard"&gt;
  &lt;p class="org">Department for Transport&lt;/p&gt;
  &lt;p class="adr"&gt;
    &lt;span class="extended-address"&gt;Great Minster House&lt;/span&gt;
    &lt;span class="street-address"&gt;76 Marsham Street&lt;/span&gt;

    &lt;span class="locality"&gt;London&lt;/span&gt;
    &lt;span class="postcode"&gt;SW1P 4DR&lt;/span&gt;
  &lt;/p&gt;

    &lt;p&gt;Telephone: &lt;span
class="tel"&gt;0300 330 3000&lt;/span>&lt;/p&gt;
    &lt;p&gt;Website: &lt;a href="http://www.dft.gov.uk"
class="url"&gt;www.dft.gov.uk&lt;/a&gt;&lt;/p&gt;
    &lt;p&gt;Email: &lt;a
href="mailto:firstname.surname@dft.gsi.gov.uk"
class="email&gt;firstname.surname@dft.gsi.gov.uk&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
</code></pre>
<p>And now let&#8217;s make it schema-org friendly using microdata (863):</p>
<pre><code>
&lt;div class="vcard" itemscope itemtype="http://schema.org/Organization"&gt;
  &lt;p class="org" itemprop="name">Department for Transport&lt;/p&gt;
  &lt;p class="adr" itemprop="address" itemscope
itemtype="http://schema.org/PostalAddress"&gt;
    &lt;span itemprop="streetAddress"&gt;
      &lt;span class="extended-address">Great Minster House&lt;/span&gt;
      &lt;span class="street-address">76 Marsham Street&lt;/span&gt;
    &lt;/span&gt;
      &lt;span class="locality" itemprop="addressLocality"&gt;London&lt;/span&gt;
      &lt;span class="postcode" itemprop="postalCode"&gt;SW1P 4DR&lt;/span&gt;
  &lt;/p&gt;

    &lt;p&gt;Telephone: &lt;span class="tel"
itemprop="telephone"&gt;0300 330 3000&lt;/span>&lt;/p&gt;
    &lt;p&gt;Website: &lt;a href="http://www.dft.gov.uk" class="url"
itemprop="url"&gt;www.dft.gov.uk&lt;/a&gt;&lt;/p&gt;
    &lt;p&gt;Email: &lt;a
href="mailto:firstname.surname@dft.gsi.gov.uk"
class="email" itemprop="email"&gt;firstname.surname@dft.gsi.gov.uk&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;
</code></pre>
<p>And we&#8217;re done.  All I wanted to do was say &#8220;this, dear Computer, is an address&#8221;.  Just getting some frankly useless out-of-the-box HTML elements on the raw data more than doubles it&#8217;s size (167 to 356), then we double it again to <em>actually</em> make it useful.</p>
<p>Now, I know size isn&#8217;t everything, and this is a pedantic, slightly silly, and probably less than accurate example.  We&#8217;re not crazy obsessed with keeping our pages below a certain size anymore (Ah&#8230; I remember back when the BBC S&#038;Gs insisted that every page had to be less than 200k down the wire <strong>including script and CSS AND images</strong>.  Those were the days.), but it&#8217;s not something to be sniffed at either.  Particularly with mark-up.  Increased size probably suggests increased complexity &#8211; more work for everyone, more chance of someone bungling the order or nesting, more simply <em>&#8220;I can&#8217;t be bothered&#8221;</em>.  Colour me dubious.  I just want to highlight how much we <em>add on</em> to HTML to make it actually do what we need.</p>
<h3><code>Itemscope</code> and <code>itemtype</code>, a brief diversion</h3>
<p>I had one of those <em>Am I crazy, but why are there two properties on these things?</em> moments.  When would you ever use one without the other?  The spec says you can use <code>itemscope</code> alone, but without <code>itemtype</code>, it&#8217;s a bit meaningless.  I think I&#8217;d do away with <code>itemscope</code> and have <code>itemtype</code> only but with a value, either a URI or something meaningful to the internal vocabulary.  <code>itemscope</code> seems to exist solely to say &#8220;the things in side me are related&#8221;, but by the very nature of it being the parent of those items, that&#8217;s already implied, and with a class name of something meaningful (say, hcard), or just the <code>itemtype</code> (with a useful value), explicit to data consumers.  </p>
<p>This isn&#8217;t sarcasm: I would gratefully receive an explanation as to why there are two attributes instead of one.</p>
<h3>Back in the room: Is this seriously what we expect authors to do?</h3>
<p>I think I&#8217;m still struggling to understand why microdata is a separate specification (or even exists if it&#8217;s not being used as a mechanism to get stuff into HTML long-term).  You can achieve exactly this richness with the current attributes supplied in HTML, and I don&#8217;t even mean just the microformats <code>class</code> way.  The <a href="http://www.w3.org/TR/html5/elements.html#embedding-custom-non-visible-data-with-the-data-attributes"><code>data-</code></a> attribute is pretty handy, though, and seems ripe for stuffing with machine data (why shouldn&#8217;t it take a URI if you really need it?).  </p>
<p>But I digress.  </p>
<p>Microdata with schema-org is solving a problem we&#8217;ve already solved in microformats, but in an equally not-quite-there way (having to specify <code>itemtype</code> with a URI more than once in a page for items that are the same, but not within the same parent, feels filthy, for example).  They are just as bad as each other, in slightly varying ways.  Useful for proving a point, allowing growth and putting out examples (not that all of these bonuses are currently being made the best of), but crappy if this is all we can muster for the long-term, high-volume, regularly published, data representation patterns in HTML.  We&#8217;re asking authors to jump through hoops still for things they shouldn&#8217;t have to.</p>
<p>Microformats, schema-org, whatever&#8230; is this really our game plan now?  Just keep throwing ever more bloat into already creaking elements when you just want to do something <em>really common</em>?  What&#8217;s the strategy for getting this stuff out of this mess and into the language?  </p>
<p>You might be asking why bother aiming to get those stronger patterns into HTML, if this mechanism basically works for getting a machine to figure out what the hell you&#8217;re trying to say, but you may as well be asking why you have any semantically meaningful elements in HTML <em>at all</em> if that&#8217;s the case.  HTML version 5 is <a href="http://html5doctor.com/i-b-em-strong-element/">redefining some elements to have better semantic meaning</a> because <em>HTML is the language of authors</em>, and to authors and consumers <em>meaning matters</em>. </p>
<p>Without a plan for gathering evidence for popularly used patterns <strong>directly</strong> from microformats or microdata (and using them as formal methods of research, testing and development), or what people (<em>actual, real developers</em> &#8211; not just the big search engines) are doing in general, we&#8217;ll end up with no progress or the <em>wrong</em> progress in HTML, and I believe that a <strong>formal process</strong> for how and when this happens should be made (i.e. definitions of what constitutes critical mass of common patterns, how the information should be gathered, how they will be proposed formally in the WG and promoted into the language proper, etc.).  </p>
<p>I want evidence-based HTML that will evolve using clearly defined mechanisms.</p>
<p><small>*Conversation shortened and re-written with an artistic license and possibly some (many; &#8220;nice&#8221; may be a stretch) inaccuracies.</small></p>
<p><small>**Yes, I&#8217;m casually suggesting that microformats are &#8220;free&#8221; if all you want to do is get your stuff out there with the minimum you&#8217;ll need to be machine-friendly and human-eyes-pretty.</small></p>

]]></content:encoded>
			<wfw:commentRss>http://fberriman.com/2011/12/01/schema-org-microformats-and-more-science-please/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Gold-plating the cow paths</title>
		<link>http://fberriman.com/2011/10/31/gold-plating-the-cow-paths/</link>
		<comments>http://fberriman.com/2011/10/31/gold-plating-the-cow-paths/#comments</comments>
		<pubDate>Mon, 31 Oct 2011 15:11:01 +0000</pubDate>
		<dc:creator>Frances</dc:creator>
				<category><![CDATA[Microformats]]></category>
		<category><![CDATA[Web Dev]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[semantics]]></category>

		<guid isPermaLink="false">http://fberriman.com/?p=592</guid>
		<description><![CDATA[I was quoted a couple of weeks ago as saying, albeit in private, the following: &#8220;HTML fails to be simple if it can&#8217;t provide what authors regularly need and end up turning to other encodings&#8221; &#8212; @phae @slightlylate For context, that was in response to a remark made by a friend that HTML fails if [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;padding-right: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ffberriman.com%252F2011%252F10%252F31%252Fgold-plating-the-cow-paths%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2FruAgFq%22%2C%20%22style%22%3A%20%22small%22%2C%20%22title%22%3A%20%22Gold-plating%20the%20cow%20paths%22%20%7D);"></div>
<p>I was quoted a couple of weeks ago as saying, albeit in private, the following:</p>
<blockquote><p>&#8220;HTML fails to be simple if it can&#8217;t provide what authors regularly need and end up turning to other encodings&#8221; &#8212; <a href="http://twitter.com/phae">@phae</a></p>
<p><cite><a href="http://twitter.com/#!/slightlylate/status/117274031090176000">@slightlylate</a></cite>
</p></blockquote>
<p>For context, that was in response to a remark made by a friend that HTML fails if authors can&#8217;t use it because it has become too complex and attempts to describe too much.  My response was that it fails not because it&#8217;s complicated, but when an author cannot express their content accurately with the toolkit they&#8217;re supplied and have to go to another encoding to find what they&#8217;re looking for.  That&#8217;s the language passing the buck, in my opinion.</p>
<p>Don&#8217;t get me wrong &#8211; I&#8217;m not suggesting HTML should cover every niche semantic everyone is ever going to want to express ever. That would be crazy and confusing.  HTML should express what is most commonly used, and at the moment it doesn&#8217;t &#8211; which is why we still see <a href="http://microformats.org">microformats</a>, <a href="http://dev.w3.org/html5/md/">microdata</a>, <a href="http://jaffathecake.posterous.com/html-component-model-the-shadow-dom">component model</a>, <a href="http://schema.org">schema.org</a> etc. trying to fill the gaps.  And not just trying to fill the gaps, but trying to provide data on which decisions can be made about what should be in HTML.</p>
<p>HTML, and a platform that provides, should be the end goal.  Microformats, et al., are the research grounds that should be directly contributing with the evidence and data they are able to garner.  In fact, the most popular microformats, shown through demand and usage, should just <em>be in</em> HTML as a standard, by being provided for with semantically appropriate new elements.</p>
<p>We&#8217;ve seen this work.  Microformats started doing things with dates, most specifically, <a href="http://microformats.org/wiki/hcalendar">hCalendar</a>.  It had a slightly cludgy way of marking up time, using <code>abbr</code>.  The accessibility lot were rightfully less than impressed, and other patterns were tried &#8211; title and spans and all kinds of things. But in short, it was shown that time gets talked about a lot, and we needed something better.  We got <code>&lt;time&gt;</code> in HTML.  Hooray!  The system works!  Well, except when it doesn&#8217;t.  <a href="http://www.brucelawson.co.uk/2011/goodbye-html5-time-hello-data/">Go read Bruce Lawson&#8217;s take</a>, as the powers that be removed <code>time</code> and replaced it with <code>data</code>.  Gee, thanks.</p>
<p>We shouldn&#8217;t expect authors to go in search of richer mark-up from other sources when what they&#8217;re trying to do is <strong>really common</strong>, when a <strong>need has been shown</strong>, and a <strong>pattern has been proven</strong>.</p>

]]></content:encoded>
			<wfw:commentRss>http://fberriman.com/2011/10/31/gold-plating-the-cow-paths/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Working for the government</title>
		<link>http://fberriman.com/2011/08/21/working-for-the-government/</link>
		<comments>http://fberriman.com/2011/08/21/working-for-the-government/#comments</comments>
		<pubDate>Sun, 21 Aug 2011 14:59:45 +0000</pubDate>
		<dc:creator>Frances</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Web Dev]]></category>
		<category><![CDATA[alphagov]]></category>
		<category><![CDATA[career]]></category>
		<category><![CDATA[govuk]]></category>
		<category><![CDATA[jobs]]></category>

		<guid isPermaLink="false">http://fberriman.com/?p=585</guid>
		<description><![CDATA[My soon-to-be-colleague, Gareth, reminded me via props that I haven&#8217;t mentioned that I&#8217;m switching jobs. From Monday, I&#8217;m going to work for the government! Having been impressed with alphagov earlier this year, I was more than happy to get onboard when the offer came up to work on the next phase of the project with [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;padding-right: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ffberriman.com%252F2011%252F08%252F21%252Fworking-for-the-government%252F%22%2C%20%22style%22%3A%20%22small%22%2C%20%22title%22%3A%20%22Working%20for%20the%20government%22%20%7D);"></div>
<p>My soon-to-be-colleague, <a href="http://morethanseven.net" rel="friend met colleague co-worker">Gareth</a>, reminded me via <a href="http://morethanseven.net/2011/08/19/On-her-majestys-digital-service.html">props</a> that I haven&#8217;t mentioned that I&#8217;m switching jobs.  From Monday, I&#8217;m going to work for the government!  </p>
<p>Having been impressed with <a href="http://alpha.gov.uk">alphagov</a> earlier this year, I was more than happy to get onboard when the offer came up to work on the <a href="http://digital.cabinetoffice.gov.uk/2011/08/11/gov-uk-from-alpha-to-beta/">next phase of the project</a> with a bunch of people I&#8217;ve known for years (and still apparently want to work with me), and a few new ones.  We&#8217;re being housed within a new department, to be known as the <a href="http://digital.cabinetoffice.gov.uk/">Government Digital Service</a>.</p>
<p>Colour me excited (but maybe not <a href="http://digital.cabinetoffice.gov.uk/2011/08/18/orange-gov-uk/">orange</a>?).</p>

]]></content:encoded>
			<wfw:commentRss>http://fberriman.com/2011/08/21/working-for-the-government/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The Moon-on-a-Stick ToDo Wishlist</title>
		<link>http://fberriman.com/2011/02/11/the-moon-on-a-stick-todo-wishlist/</link>
		<comments>http://fberriman.com/2011/02/11/the-moon-on-a-stick-todo-wishlist/#comments</comments>
		<pubDate>Fri, 11 Feb 2011 09:48:20 +0000</pubDate>
		<dc:creator>Frances</dc:creator>
				<category><![CDATA[Life]]></category>
		<category><![CDATA[Web Dev]]></category>
		<category><![CDATA[halp]]></category>
		<category><![CDATA[poor organisational skills]]></category>
		<category><![CDATA[todo]]></category>

		<guid isPermaLink="false">http://fberriman.com/?p=566</guid>
		<description><![CDATA[I rhetorically asked on Twitter yesterday if there was a better way to manage my todo lists of scraps of paper, my moleskine, jira and basecamp.  I&#8217;m not sure that I made it clear: I&#8217;m not looking for a replacement for those. They&#8217;re not going away. I need a master-something that can manage the fact [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;padding-right: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ffberriman.com%252F2011%252F02%252F11%252Fthe-moon-on-a-stick-todo-wishlist%252F%22%2C%20%22style%22%3A%20%22small%22%2C%20%22title%22%3A%20%22The%20Moon-on-a-Stick%20ToDo%20Wishlist%22%20%7D);"></div>
<p>I rhetorically <a href="http://twitter.com/#!/phae/status/35768429734526977">asked on Twitter yesterday</a> if there was a better way to manage my todo lists of scraps of paper, my moleskine, jira and basecamp.  I&#8217;m not sure that I made it clear: I&#8217;m not looking for a <strong>replacement</strong> for those.  <em>They&#8217;re not going away.</em> I need a master-something that can manage the fact that my todos are spread over many mediums and systems (by necessity, rather than choice).  I can&#8217;t manage a 5th system that I&#8217;d need to manually synchronise.</p>
<p>So. This is my &#8220;in a magical world of unicorns and rainbows&#8221; wishlist for a ToDo application:</p>
<ul>
<li>Has a web, desktop (not just osx) and mobile client.  If I can&#8217;t get at it wherever I am, I won&#8217;t use it.</li>
<li>Pulls in and syncs assigned tickets from bug trackers &#8211; like Jira, Trac.</li>
<li>Pulls in and syncs todos from shared workspaces &#8211; like Basecamp.</li>
<li>Needs to be able to pull in tickets/lists from *insert future system a company I will work for will assume is the answer to all their problems*.</li>
<li>Needs to be free-form enough to add items that don&#8217;t have dates.</li>
<li>If they do have dates, I want to show them on my google calendar.</li>
<li>Needs to be as quick to throw an item onto the end of the list as it is to scrawl it on a post-it note.</li>
<li>Have a public sharable view and also private items.  Bonus for levels of access to certain friend/colleague/family groups.</li>
<li>Sets fire to any project manager who thinks sending me an excel spreadsheet of brightly coloured items copied out of Jira will help my day go more smoothly.</li>
<li>Super dream world: should be able to <a href="http://en.wikipedia.org/wiki/Optical_character_recognition">OCR</a> a photo of scrawled notes from my notebook/hand (ala Evernote) taken by the new <a href="http://twitter.com/#!/phae/status/30932552382414848">shiny</a>.</li>
<li>Super bonus extra dream world: should offer to make me a cup of tea when it notices a complete nightmare of todos all happening at once.</li>
</ul>
<p>I&#8217;m beginning to think that this was the most accurate response I received:</p>
<blockquote>
<p>@phae Personal assistant?</p>
<p><em>by <a href="http://twitter.com/#!/paul_haine/status/35775019661398016">Paul Haine</a></em></p>
</blockquote>

]]></content:encoded>
			<wfw:commentRss>http://fberriman.com/2011/02/11/the-moon-on-a-stick-todo-wishlist/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>24ways 2010</title>
		<link>http://fberriman.com/2010/12/11/24ways-2010/</link>
		<comments>http://fberriman.com/2010/12/11/24ways-2010/#comments</comments>
		<pubDate>Sat, 11 Dec 2010 10:13:02 +0000</pubDate>
		<dc:creator>Frances</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[Web Dev]]></category>
		<category><![CDATA[24ways]]></category>
		<category><![CDATA[annual]]></category>
		<category><![CDATA[book]]></category>
		<category><![CDATA[documentation]]></category>

		<guid isPermaLink="false">http://fberriman.com/?p=545</guid>
		<description><![CDATA[So, I wrote a little article for this year&#8217;s 24ways on documentation. It&#8217;s based heavily on the processes we used to develop BBC Glow, so I hope someone finds it useful. If you&#8217;re feeling charitable, this year you can buy my article and the other brilliant 23 as an annual from Five Simple Steps: 24ways [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;padding-right: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ffberriman.com%252F2010%252F12%252F11%252F24ways-2010%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2FeFy5hQ%22%2C%20%22style%22%3A%20%22small%22%2C%20%22title%22%3A%20%2224ways%202010%22%20%7D);"></div>
<p>So, I <a href="http://24ways.org/2010/documentation-driven-design-for-apis">wrote a little article for this year&#8217;s 24ways</a> on documentation.  It&#8217;s based heavily on the processes we used to develop <a href="http://bbc.co.uk/glow">BBC Glow</a>, so I hope someone finds it useful.</p>
<p>If you&#8217;re feeling charitable, this year you can buy my article and the other brilliant 23 as an annual from Five Simple Steps: <a href="http://fivesimplesteps.com/books/the-24-ways-annual-2010">24ways 2010 Annual</a>, with the proceeds going to UNICEF.  Yay!  </p>

]]></content:encoded>
			<wfw:commentRss>http://fberriman.com/2010/12/11/24ways-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>hgroups and sub-titles</title>
		<link>http://fberriman.com/2010/07/22/hgroups-and-sub-titles/</link>
		<comments>http://fberriman.com/2010/07/22/hgroups-and-sub-titles/#comments</comments>
		<pubDate>Thu, 22 Jul 2010 22:20:08 +0000</pubDate>
		<dc:creator>Frances</dc:creator>
				<category><![CDATA[Web Dev]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[headings]]></category>
		<category><![CDATA[hgroup]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[semantics]]></category>

		<guid isPermaLink="false">http://fberriman.com/?p=474</guid>
		<description><![CDATA[I realise that queries or concerns about HTML 5 elements should make their way onto the WHATWG mailing list, but I just wanted to get a few thoughts out on here about what I&#8217;ve spent far too long discussing at work recently. It&#8217;s perfectly likely that I&#8217;ve totally got the wrong end of the proverbial, [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;padding-right: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ffberriman.com%252F2010%252F07%252F22%252Fhgroups-and-sub-titles%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2FdoKOKM%22%2C%20%22style%22%3A%20%22small%22%2C%20%22title%22%3A%20%22hgroups%20and%20sub-titles%22%20%7D);"></div>
<p>I realise that queries or concerns about HTML 5 elements should make their way onto the WHATWG mailing list, but I just wanted to get a few thoughts out on here about what I&#8217;ve spent far too long discussing at work recently. It&#8217;s perfectly likely that I&#8217;ve totally got the wrong end of the proverbial, so this is just me trying to get my mind straight on why I feel something about this is unnatural and I welcome comments to help clarify or discuss.</p>
<h3>So, <code>hgroup</code>, eh?</h3>
<p><code>hgroup</code> is one of the new elements featuring in the HTML 5 specification.  It&#8217;s purpose, quite simply, is to group two or more headings together into one block so that subheadings are treated differently and only the first heading becomes part of the document outline.</p>
<blockquote><p>The hgroup element is typically used to group a set of one or more h1-h6 elements — to group, for example, a section title and an accompanying subtitle.</p>
<p><cite><a href="http://www.w3.org/TR/html-markup/hgroup.html">From the current HTML5 working draft</a></cite></p></blockquote>
<p>The WHATWG wiki has the following rationale for requiring the <code>hgroup</code> element:</p>
<blockquote><p>The point of &lt;hgroup&gt; is to hide the subtitle from the outlining algorithm</p>
<p><cite><a href="http://wiki.whatwg.org/wiki/Rationale#hgroup_and_other_heading_elements">WHATWG wiki</a></cite></p></blockquote>
<p>Over on HTML5 Doctor, <a href="http://html5doctor.com/the-hgroup-element/#comment-2603">John Allsopp appears to find fault with this element also</a> and suggests that the requirement for <code>hgroup</code> is symptomatic of a flaw in the outlining algorithm.  I can see his point, but I&#8217;m more concerned that it&#8217;s a fundamentally inaccurate use of a <em>heading</em>.</p>
<p>In my mind, headings are designed to denote sections.  At least, that&#8217;s what they were used for in HTML 4.  Things either went in a heading, because they denoted a new section of content, or they didn&#8217;t.  This is Frances the idealist speaking, I realise this, but still.</p>
<p>Let&#8217;s say I had a new website about a children&#8217;s story about monsters, and I wanted to title it &#8220;Monsters live under my bed&#8221;, but it could also have a sub-title or strap-line.  As an author, I either want my title to be &#8220;Monsters live under my bed. Where things go bump in the night&#8221; or I want it to be &#8220;Monsters live under my bed&#8221; and the next line is incidental and a supplementary strap-line and not something I would consider to be part of my title.</p>
<p>Currently, I might do any of the following:</p>
<pre><code>&lt;h1&gt;Monsters live under my bed
Where things go bump in the night
&lt;/h1&gt;</code></pre>
<p>Example wrapped for legibility, but my story title is the full text and is in a heading.</p>
<pre><code>&lt;h1&gt;Monsters live under my bed
&lt;span&gt;Where things go bump in the night&lt;/span&gt;
&lt;/h1&gt;</code></pre>
<p>This one is mostly a stylistic example. The strapline needs to <em>look</em> like a strapline, so I&#8217;ve stuck a span around it (yeah, I know&#8230;), but fundamentally I&#8217;m still considering it to be part of the title.  My story&#8217;s name is the full text.</p>
<pre><code>&lt;h1&gt;Monsters live under my bed&lt;/h1&gt;
&lt;p&gt;Where things go bump in the night&lt;/p&gt;
</code></pre>
<p>In this case, the title of my story is <strong>only</strong> &#8220;Monsters live under my bed&#8221; and because HTML 4 doesn&#8217;t really offer a suitable element that I would consider &#8220;a sub header that isn&#8217;t a new section of the document&#8221; I&#8217;ve stuck the sub-title text in a paragraph.</p>
<pre><code>&lt;h1&gt;Monsters live under my bed&lt;/h1&gt;
&lt;h2&gt;Where things go bump in the night&lt;/h2&gt;</code></pre>
<p>This one suggests that I have a title and then the first chapter beneath the title is &#8220;Where things go bump in the night&#8221;.  That second line is no longer the title of my kids story.  The h2 would be a new indented item in an outline and would suggest that further within the document I may find more h2s and that I have stepped into the document by a level.</p>
<p>What HTML 5 says you would do is this if you want a sub-title/sub-heading is:</p>
<pre><code>&lt;hgroup&gt;
&lt;h1&gt;Monsters live under my bed&lt;/h1&gt;
&lt;h2&gt;Things that go bump in the night&lt;/h2&gt;
&lt;/hgroup&gt;</code></pre>
<p>This has the effect of making that <code>h2</code> not appear in the outline, since it will no longer create a new section. The outline now considers that the title of my story is again &#8220;Monsters live under my bed&#8221;.  Any content that comes after this would be within the section titled by the <code>h1</code>.  The <code>h2</code> doesn&#8217;t count as the start of a new section (as it would if there was no <code>hgroup</code> wrapper). The contents of the <code>h2</code> is considered a special non-sectioning-heading case, but it&#8217;s still in a <strong>heading</strong> element.  But if it&#8217;s meant to be a <em>heading</em>, why isn&#8217;t it in the <code>h1</code>?  Gah!</p>
<p>I kind of have the feeling that what we should have at our disposal is something that looks more like the following, which allows for a heading <strong>and</strong> some sort of sub-title(s) (naming isn&#8217;t my strong point, I&#8217;ve picked &#8216;strapline&#8217; fairly arbitrarily, but essentially I imagine it as a non-heading sub-title of some nature &#8211; maybe even <code>subheading</code>?).  It&#8217;s not as if <code>hgroup</code> is allowed to hold anything other than headings anyway.</p>
<pre><code>&lt;h1&gt;Monsters live under my bed&lt;/h1&gt;
&lt;strapline&gt;Where things go bump in the night&lt;strapline&gt;</code></pre>
<p>It satisfies my problem with using lower numbered headings for things you consider to either be associated as part of the first heading (or rather, supplementary to it) or not actually headings at all.  If I want my full title to be all of the above, it can all go in the <code>h1</code>.  If I don&#8217;t consider the second line to be part of a heading, it gets to go in it&#8217;s own non-heading supplementary titling element.  The rationale quoted above specifically says &#8220;subtitle&#8221;, although I noticed the current <a href="http://dev.w3.org/html5/spec-author-view/sections.html#the-hgroup-element">editor&#8217;s draft for hgroup</a> does mention &#8220;subheadings&#8221;.</p>
<p>Do you follow my drift?</p>
<p>If we&#8217;re in the business of having the opportunity to create new elements, can&#8217;t we just create one that actually satisfies the requirement explicitly rather than sort of allow authors to do things that seem somehow hypocritical to the point of heading elements in most other contexts.  I also realise that purist intentions fall waaaaay down the list of priorities when compared to the requirements of paving existing usage, but as an author as well, I feel that there&#8217;s something fundamentally inaccurate about treating a <em>heading</em> as a non-heading.  As an author I want to be able to be as accurate as possible.</p>
<p>Is it just time for me to let go of the idea that headings do the job of creating and naming sections in a document outline?</p>
<p>Aren&#8217;t semantics fun!</p>

]]></content:encoded>
			<wfw:commentRss>http://fberriman.com/2010/07/22/hgroups-and-sub-titles/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>Science Hack Day, Turing Tests and Google</title>
		<link>http://fberriman.com/2010/06/16/science-hack-day-turing-tests-and-google/</link>
		<comments>http://fberriman.com/2010/06/16/science-hack-day-turing-tests-and-google/#comments</comments>
		<pubDate>Wed, 16 Jun 2010 10:21:31 +0000</pubDate>
		<dc:creator>Frances</dc:creator>
				<category><![CDATA[Microformats]]></category>
		<category><![CDATA[Web Dev]]></category>
		<category><![CDATA[artificial intelligence]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[p52]]></category>
		<category><![CDATA[rdf]]></category>
		<category><![CDATA[science hack day]]></category>
		<category><![CDATA[turing]]></category>
		<category><![CDATA[turing test]]></category>

		<guid isPermaLink="false">http://fberriman.com/?p=417</guid>
		<description><![CDATA[For Science Hack Day, I have have been thinking about a topic that was of great interest to me whilst I was at university &#8211; artificial intelligence. Science Hack Day hasn&#8217;t actually happened yet, by the way. It&#8217;s going on this weekend (19th &#038; 20th June) at the Guardian offices, and there&#8217;s still time to [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;padding-right: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ffberriman.com%252F2010%252F06%252F16%252Fscience-hack-day-turing-tests-and-google%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2F9sRbdr%22%2C%20%22style%22%3A%20%22small%22%2C%20%22title%22%3A%20%22Science%20Hack%20Day%2C%20Turing%20Tests%20and%20Google%22%20%7D);"></div>
<p>For <a href="http://sciencehackday.com/">Science Hack Day</a>, I have have been thinking about a topic that was of great interest to me whilst I was at university &#8211; artificial intelligence.</p>
<p>Science Hack Day hasn&#8217;t actually happened yet, by the way.  It&#8217;s going on this weekend (19th &#038; 20th June) at the Guardian offices, and there&#8217;s still time to <a href="http://sciencehackday.pbworks.com/Who%27s-Coming">sign up</a> if you&#8217;re interested.  This is an idea I was playing around with, but I probably won&#8217;t be doing this at the weekend unless it piques someone else&#8217;s (with more linguistic intellect) interest.  Feel free to bug me if this is a topic to chat about.</p>
<h3>The Turing Test</h3>
<p>One of the basic concepts and experiments in the AI world is the now defunct, but intellectually and philosophically interesting, Turing Test.  In the simplest terms, the test is around proving intelligence by showing human characteristics through dialogue and natural language, and this is shown through genuine human testers being blindly pitted against either another real human being, or a test program, and guessing as to whether their conversational partner is a human or not.  Every year challengers from around the world <a href="http://www.loebner.net/Prizef/loebner-prize.html">still compete</a> in this test, and produce complex computer programs that can converse with human beings and nearly fool them into believing they too are human.  No one has created a program that can behave accurately, or more often randomly enough, to fool participants completely &#8211; which is why it remains an interesting, although essentially irrelevant, problem.</p>
<p>The reason this test is defunct as a gauge of intelligence is pretty obvious in hindsight.  Being able to converse like a human being might show that whatever it is doing the conversing can take apart the constituent parts of a sentence and cobble them back together with some new information to fool a human, but it&#8217;s not really showing other markers of intelligence &#8211; specifically the ability to <em>think</em>. And neither does an entity being unable to converse in this way preclude it from having intelligence &#8211; you just need to look around our own animal kingdom and see the wealth of intelligence shown in other organisms that have no verbal language.  The &#8216;<a href="http://en.wikipedia.org/wiki/Chinese_room">Chinese Room</a>&#8216; is the original thought experiment that describes this specific problem, which you should totally go and read about <em>right now</em>.</p>
<p>Now, I&#8217;m not for one moment suggesting that over 2 days (or 2 lifetimes) a person such as myself with no linguistics or complex algorithms training could create a program that could have a go at passing the Turing test and win the Loebner Prize, but I got to thinking about how people interact with the internet in such a way that maybe the Internet itself could be considered to have the capabilities, and the depth and range of knowledge, to show &#8216;intelligence&#8217; as Turing would have defined it through this test.</p>
<h3>Google as an intelligent conversationalist</h3>
<p>Go to Google and ask it a question &#8211; even better, ask it a question and hit &#8216;I&#8217;m feeling lucky&#8217;.  Most of the time it produces an &#8216;answer&#8217; that&#8217;s pretty bloomin&#8217; accurate to what you&#8217;re looking for. Take a sample of that page that possibly directly answers that question and cobble it into some pigeon English, and would that do as a conversational retort?  Reckon it could have a stab at knowing the punchline to your rubbish &#8216;Knock knock&#8230;&#8217; joke? I think it could.</p>
<p>In fact, from the <a href="http://loebner.net/Prizef/2010_Contest/Loebner_Prize_Rules_2010.html">Loebner Prize rules</a>, the sample questions are all easily answerable by Google &#8211; the only thing it would struggle with is the memory part, but with Google&#8217;s ever growing logging of what kind of information you search for, it&#8217;s only a short way from that. </p>
<p>I was googling about trying to find other people who must have been thinking about using search engines for turing tests, and came across <a href="http://www.boxesandarrows.com/view/applying-turings">John Ferrara in 2008</a> discussing the user interaction benefits of using search in a way that would produce Turing test-ready results (I particularly like his accurate prediction that ontologies are the way forward &#8211; more on that later).  Google is clearly doing some really interesting, and without doubt highly complex, things around parsing search terms and working out what the interesting parts of the query are.  They&#8217;re doing Natural Language Parsing, but just one way &#8211; the asker to the responder.</p>
<h3>Natural Language Parsers</h3>
<p>So, I started digging about on the web for a natural language parser to see if I could maybe package up Google results in one line retorts.  In JavaScript.  Mostly because I&#8217;m a client-side developer, but also because that seemed like a funny idea (one late night after a couple Amstels) and JS can be lightning fast in the right environment.  Unsurprisingly &#8211; there wasn&#8217;t one.  I found this nice little <a href="http://code.google.com/p/jspos/">&#8216;parts of sentence&#8217;</a> tagger that someone had ported from another project into JS, and this seemed like a good start, and there&#8217;s <a href="http://opennlp.sourceforge.net/">OpenNLP</a> &#8211; the open source hub for NLPs (mostly in Java, Perl and Python).  Then <a href="http://jakearchibald.co.uk" rel="friend met colleague">Jake</a> suggested I port one of the ones in Python to JS.  <em>Ah hah hah</em>, where&#8217;s that &lt;sarcasm&gt; element when you need it?</p>
<p>The highly complex NLP part is really only the dressing.  It&#8217;s the bit that does the fakery and really reacts and responds and produces pretend empathy and is essentially what people who are trying to win the Loebner Prize care about &#8211; to be honest, there&#8217;s plenty of real people behind machines to talk to than we really need as it is on the internets, let alone adding a bunch of equally inane computer ones &#8211; so I&#8217;m not really that interested in that to any complex level &#8211; I just need something relatively simple.</p>
<p>I <strong>am</strong> interested in mining the ever growing source of richly marked up data and sources on the web, and presenting them back to a human being in a friendly, natural way.  Basically, I want one of those slightly-sinister robot voices talking to me from my computer, as featured in all good sci-fis (maybe less Hal and more Gerty) who can cooly and calmly, for example, present me the probable likelihood of poisoning myself by eating out-of-date eggs or what factor suncream it might be wise to wear to the park tomorrow so that I don&#8217;t burn to a crisp. An information supplier and sympathiser that&#8217;s smarter than me and knows about more sources of information than I could and can save me a bit of time wading through google results.</p>
<h3>Let&#8217;s talk</h3>
<p>So, on to my fuzzy notion of how this might work, just as a thought experiment at first and maybe a slightly naff proof of concept.</p>
<p>Blindly searching google for sensible responses from any old web page seems foolish.  An awful lot of sites continue to be badly formed and unintelligible to machines.  The obvious thing to do is restrict searches to sites with well-formed data &#8211; <a href="http://microformats.org">microformats</a> and RDF seem like the obvious things to look for.  This clearly poses a slight problem in that not all topics exist in well-formed data, but over time, that&#8217;ll improve.  To make this proof of concept easier, and one that I could feasibly think about building in a weekend, I&#8217;m therefore going to limit the topics of interest to data I know I can get at in a well-formed model.</p>
<p>Let&#8217;s have a chat about food.  I&#8217;m going to propose a fictional conversation that I want to create the responses to automatically.</p>
<p>Maybe we want to ask our machine:</p>
<blockquote><p>Do you know any good vegetarian recipes?.</p>
</blockquote>
<p>A good response might be: </p>
<blockquote><p>Yes, I know 20582746 vegetarian recipes.  Do you want to narrow it down a bit?</p>
</blockquote>
<blockquote><p>Yes, I&#8217;m looking for a good recipe for a feta and spinach tart.</p>
</blockquote>
<blockquote><p>I have a good recipe for that.  Would you like me to give you a link to it, or just tell you the ingredients?</p>
</blockquote>
<p>I want to stop there and illustrate a couple of interesting things about these sentences.  Firstly, the word &#8216;good&#8217;.  How could a machine know if a recipe is good?  Well, hRecipe allows for a recipe to receive a rating &#8211; the machine could use this to determine whether to describe the recipe it&#8217;s found as &#8216;good&#8217;.   Likewise, I could have asked it &#8216;What&#8217;s the worst meal you&#8217;ve eaten?&#8217; and perhaps it trawls off for the first lowest rated recipe it can find and declares that its least favourite.  Kind of makes me think that this machine person would need to be called Legion, because rather than having the opinion of an individual (or rather the opinion of the programmer), it has the crowd-sourced opinion of all web participants.</p>
<blockquote><p>Great. Does it have tomatoes in it?  I don&#8217;t like tomatoes.</p>
</blockquote>
<blockquote><p>No. Would you like the recipe now?</p>
</blockquote>
<blockquote><p>Yes, what are the ingredients?</p>
</blockquote>
<p>And so on&#8230; Having a program read back the parts of a well-formed recipe are really easy.  Recipes marked as <a href="http://microformats.org/wiki/hrecipe">hRecipe</a> clearly define each of the parts.  You could ask it to read you step one of the method, or repeat step 3, or double check what temperature the oven needs to be at.  To be honest, you could obviously be reading that directly yourself, but the act of marking up information like that makes it really easy to programmatically extra useful, relevant, information out of a webpage, strap it into some semblance of natural english, and read it out to a person in such a way that a person might believe that a human being was interpreting the page, which they could find more accessible.  And that&#8217;s the ticket, really.  Google search results, or rather the elements derived from rich data snippets, become the lexicon element of the previously mentioned NLPs.</p>
<h3>Limitations</h3>
<p>What it probably couldn&#8217;t do is tell you how it&#8217;s feeling or where it lives &#8211; the sort of questions and topics that turn up in the logs for turing tests &#8211; but really, does it matter?  It would probably also get confused really easily by badly formed pages and it would just as happily give you bad, irrelevant or plain gibberish responses sometimes &#8211; but all computers will do that &#8211; which is a greater reason to make pages as well-formed and parsable as possible.</p>
<p>Even if my notion of a simple friendly-face Google bot couldn&#8217;t pass the Turing Test, I bet that if Alan Turing had still been alive at the advent of Google and Wolfram Alpha and the likes, he&#8217;d be bloody impressed and be pleased to know that he probably instigated some of it. </p>
<p>Which reminds me &#8211; June 2012 will celebrate Turing&#8217;s 100th birthday &#8211; Pretty sure we&#8217;ll need to have an extra special Science Hack Day for that too, don&#8217;t you think?</p>

]]></content:encoded>
			<wfw:commentRss>http://fberriman.com/2010/06/16/science-hack-day-turing-tests-and-google/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>London Web Standards &#8211; slides and further info</title>
		<link>http://fberriman.com/2010/04/23/london-web-standards-slides-and-further-info/</link>
		<comments>http://fberriman.com/2010/04/23/london-web-standards-slides-and-further-info/#comments</comments>
		<pubDate>Fri, 23 Apr 2010 13:15:03 +0000</pubDate>
		<dc:creator>Frances</dc:creator>
				<category><![CDATA[Speaking]]></category>
		<category><![CDATA[Web Dev]]></category>
		<category><![CDATA[glow]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[london web standards]]></category>
		<category><![CDATA[londonwebstandards]]></category>
		<category><![CDATA[p52]]></category>
		<category><![CDATA[slides]]></category>

		<guid isPermaLink="false">http://fberriman.com/?p=393</guid>
		<description><![CDATA[Sorry for the delay, but I finally got around to sticking my presentation from last month&#8217;s London Web Standards meet-up on slideshare. Slideshare is a bit naff to be honest, but it&#8217;ll do for now. If you click through to the talk on slideshare, you&#8217;ll be able to get my notes which should hopefully make [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;padding-right: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ffberriman.com%252F2010%252F04%252F23%252Flondon-web-standards-slides-and-further-info%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2F9TkJlv%22%2C%20%22style%22%3A%20%22small%22%2C%20%22title%22%3A%20%22London%20Web%20Standards%20-%20slides%20and%20further%20info%22%20%7D);"></div>
<p>Sorry for the delay, but I finally got around to sticking my presentation from <a href="http://fberriman.com/2010/03/12/london-web-standards-talks/">last month&#8217;s</a> <a href="http://www.londonwebstandards.org/2010/03/lws-march-live-blog/">London Web Standards</a> meet-up on slideshare.  Slideshare is a bit naff to be honest, but it&#8217;ll do for now.  If you <a href="http://www.slideshare.net/phae/pro-bunfighting-3827912">click through to the talk on slideshare</a>, you&#8217;ll be able to get my notes which should hopefully make the pictures more useful.  <a href="http://jakearchibald.co.uk" rel="friend met colleague co-worker">Jake</a>&#8216;s busy syncing up both of our presentations to the videos so that we can show them on the <a href="http://www.bbc.co.uk/blogs/webdeveloper/">BBC developer blog</a>, so as soon as they&#8217;re available I&#8217;ll link those up too and you can view me in full hand-flapping, ranting form.</p>
<p>I think I speak for both of us when I say that we really enjoyed the evening &#8211; everyone was lovely and friendly and asked really excellent questions.  Highly recommendable meet-up, and we&#8217;re both intending to try and make it to some of the future sessions.</p>
<p>Some useful links from my stuff:</p>
<ul>
<li><a href="http://fberriman.com/2010/01/12/javascript-speed-testing-with-woosh/">My previous write-up about using Woosh</a> (although note that Woosh has become a bit more featureful since that write-up)</li>
<li><a href="http://github.com/jquery/qunit">QUnit</a></li>
<li><a href="http://github.com/glow">Glow Github repos</a> and the <a href="http://bbc.co.uk/glow">Glow website and docs</a></li>
<li><a href="http://code.google.com/p/jsdoc-toolkit/">JSDoc Toolkit</a></li>
</ul>
<div style="width:425px; margin-left:2em;margin-top:2em" id="__ss_3827912"><object width="425" height="355"><param name="movie" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=webstandards-100423044504-phpapp02&#038;rel=0&#038;stripped_title=pro-bunfighting-3827912" /><param name="allowFullScreen" value="true"/><param name="allowScriptAccess" value="always"/><embed src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=webstandards-100423044504-phpapp02&#038;rel=0&#038;stripped_title=pro-bunfighting-3827912" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="355"></embed></object></div>

]]></content:encoded>
			<wfw:commentRss>http://fberriman.com/2010/04/23/london-web-standards-slides-and-further-info/feed/</wfw:commentRss>
		<slash:comments>31</slash:comments>
		</item>
		<item>
		<title>London Web Standards Talks</title>
		<link>http://fberriman.com/2010/03/12/london-web-standards-talks/</link>
		<comments>http://fberriman.com/2010/03/12/london-web-standards-talks/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 13:36:58 +0000</pubDate>
		<dc:creator>Frances</dc:creator>
				<category><![CDATA[Speaking]]></category>
		<category><![CDATA[Web Dev]]></category>
		<category><![CDATA[glow]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[london web standards]]></category>
		<category><![CDATA[londonwebstandards]]></category>
		<category><![CDATA[p52]]></category>

		<guid isPermaLink="false">http://fberriman.com/?p=363</guid>
		<description><![CDATA[Jake and I will be guests at March&#8217;s London Web Standards meetup. We&#8217;re giving a pair of JavaScript themed talks that should give plenty of fodder for the latter half of the evening&#8217;s discussion. I&#8217;m doing &#8220;Pro bun-fighting&#8220;, covering how we manage working on a large scale JavaScript project with a small team, our process, [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;padding-right: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ffberriman.com%252F2010%252F03%252F12%252Flondon-web-standards-talks%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2FaKzBIN%22%2C%20%22style%22%3A%20%22small%22%2C%20%22title%22%3A%20%22London%20Web%20Standards%20Talks%22%20%7D);"></div>
<p><a href="http://jakearchibald.co.uk" rel="friend met colleague co-worker">Jake</a> and I will be guests at March&#8217;s <a href="http://www.londonwebstandards.org/">London Web Standards</a> meetup.  We&#8217;re giving a pair of JavaScript themed talks that should give plenty of fodder for the latter half of the evening&#8217;s discussion.  I&#8217;m doing &#8220;<em>Pro bun-fighting</em>&#8220;, covering how we manage working on a large scale JavaScript project with a small team, our process, the performance and quality testing we do, and how to integrate group hugs, and Jake will be doing &#8220;<em>The events left behind</em>&#8220;, talking about the horrors of keyboard events, how to work around them and what&#8217;s their future.</p>
<p>Although it&#8217;s not a <a href="http://bbc.co.uk/glow">Glow</a> specific talk, we will be using Glow in our examples, so feel free to come along and talk to us about the library too, if you&#8217;re interested.</p>
<p><a href="http://lwsbbcglow.eventbrite.com/">Tickets are available now</a> for the event on Wednesday 31st March at The Square Pig in London.</p>

]]></content:encoded>
			<wfw:commentRss>http://fberriman.com/2010/03/12/london-web-standards-talks/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>JavaScript speed testing tutorial with Woosh</title>
		<link>http://fberriman.com/2010/01/12/javascript-speed-testing-with-woosh/</link>
		<comments>http://fberriman.com/2010/01/12/javascript-speed-testing-with-woosh/#comments</comments>
		<pubDate>Tue, 12 Jan 2010 15:05:00 +0000</pubDate>
		<dc:creator>Frances</dc:creator>
				<category><![CDATA[Web Dev]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[p52]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[woosh]]></category>

		<guid isPermaLink="false">http://fberriman.com/?p=256</guid>
		<description><![CDATA[Friend and colleague, Jake Archibald, has been developing Woosh, which is a JavaScript speed testing framework. Essentially, it&#8217;s been developed for Glow because we want to make sure that Glow 2 kicks Glow 1&#8242;s ass (and any else who fancies a piece), but he&#8217;s open-sourced the work to let everyone benefit from it. I thought [...]]]></description>
			<content:encoded><![CDATA[
<div class="topsy_widget_data topsy_theme_blue" style="float: right;padding-right: 0.75em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Ffberriman.com%252F2010%252F01%252F12%252Fjavascript-speed-testing-with-woosh%252F%22%2C%20%22shorturl%22%3A%20%22http%3A%2F%2Fbit.ly%2F6LwpPp%22%2C%20%22style%22%3A%20%22small%22%2C%20%22title%22%3A%20%22JavaScript%20speed%20testing%20tutorial%20with%20Woosh%22%20%7D);"></div>
<p>Friend and colleague, <a rel="friend met colleague co-worker" href="http://jakearchibald.co.uk">Jake Archibald</a>, has been developing <a href="http://github.com/jakearchibald/Woosh">Woosh</a>, which is a JavaScript speed testing framework.  Essentially, it&#8217;s been developed for <a href="http://bbc.co.uk/glow">Glow</a> because we want to make sure that Glow 2 kicks Glow 1&#8242;s ass (and any else who fancies a piece), but he&#8217;s open-sourced the work to let everyone benefit from it.</p>
<p>I thought I&#8217;d run you through how to set up some basic tests and start benchmarking your own code with Woosh.  Bear with me, as it&#8217;s still quite new to us too.</p>
<h3>Setup</h3>
<p>Firstly, go and grab the latest copy of <a href="http://github.com/jakearchibald/Woosh">Woosh from the Github repo</a> and pop it somewhere to work with it. You&#8217;re just running scripts, so there&#8217;s nothing to install or configure.  Bear in mind that at the time of writing, Woosh isn&#8217;t at it&#8217;s first version yet &#8211; so, not that I&#8217;m doubting Jake&#8217;s work, you may find the odd bug and if you do, I&#8217;m sure logging it in the <a href="http://github.com/jakearchibald/Woosh/issues">issues tracker</a> would be marvellous.</p>
<p>If you&#8217;re a git user, feel free to include Woosh as a <a href="http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#submodules">submodule</a> of your own project.</p>
<p>Woosh is primarily designed for comparing libraries, but there&#8217;s no reason why you can&#8217;t use it to take a benchmark of your existing scripts and then work up optimised versions to compare.  If your code can be unit tested well, it can be speed tested just as easily.</p>
<p>Firstly, you need to let Woosh know about the scripts you want to test.  You can just add references to each of your scripts using the <code>Woosh.libs</code> property.  For each script to test, though, just make sure they have a unique name so you can reference them later (have a sneaky look in Woosh.js to see which libraries already exist and the formats used &#8211; infact, if you&#8217;re taking your own copy of Woosh, you can just edit your files and add your scripts straight into this file and skip adding them in the test runner page).</p>
<p>Below is how your test runner HTML page should look (also available in the <a href="http://github.com/jakearchibald/Woosh/blob/master/exampletests/template/index.html">examples directory</a> in the Woosh repo).  Notice the reference to your script in the woosh include section, then beneath are links to your individual test files.  To make it more manageable, it&#8217;s probably best to have one test JS for each script you&#8217;re comparing.  Remember that Woosh looks for your scripts relative to where you&#8217;ve got woosh.js.</p>
<pre><code>
&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
        "http://www.w3.org/TR/html4/strict.dtd"&gt;
&lt;html lang="en"&gt;
&lt;head&gt;
	&lt;meta http-equiv="content-type" content="text/html; charset=utf-8"&gt;
	&lt;title&gt;My Tests&lt;/title&gt;

	&lt;!-- include woosh --&gt;
	&lt;script src="/where/youve/got/it/lib/woosh/woosh.js" type="text/javascript"&gt;
		woosh.libs['myTestScript1'] = ['/path/to/scripts/myTestScript.js']
	&lt;/script&gt;

	&lt;!-- Add any CSS you need for the test, but restrict styles to #htmlForTest --&gt;

	&lt;!-- Add your tests. The first will be treated as the master --&gt;
	&lt;script src="MyTestScipt1-Tests.js" type="text/javascript"&gt;&lt;/script&gt;

&lt;/head&gt;
&lt;body&gt;
	&lt;div id="wooshOutput"&gt;&lt;/div&gt;
	&lt;div id="htmlForTest"&gt;
		&lt;!--
			Put elements you want to use in your tests here. The page will be
			refreshed for each set of tests, so don't worry about one framework
			messing with another.
		--&gt;
	&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>
<p>The final item in the example above would be your intitial test script to be benchmarked (MyTestScript1-Tests.js).  This is just a JavaScript file which will call <code>woosh.addTests</code> (as further down).</p>
<p>Now you&#8217;ve got a choice: You can either make minor changes and incrementally watch the improvements, possibly using the save feature, or you can create a copy of your script.  I&#8217;d recommend the latter, so create a copy of your script, and add a reference to it with <code>Woosh.libs</code> again and also create a file to add the actual tests to for it.</p>
<p>You can add and compare as many scripts as you like, so long as their methods are comparably the same.</p>
<h3>Creating tests</h3>
<p>Adding tests is easy and in a way, they become an extension of your unit tests, confirming that the return values or behaviours match across the board.</p>
<p>Test files look like this and you can either put all your tests in each file, with a block for each script, or put each block in it&#8217;s own file.  So, below would be your contents of MyTestScript1-Tests.js.  You&#8217;ll need a second for MyTestScript2-Tests.js etc.</p>
<pre><code>
woosh.addTests('myTestScript1',
	'Test name identifier 1': new woosh.Test(1000, function() {
		return myFunc();
	}),
	'Test name identifier 2': new woosh.Test(1000, function() {
		return myOtherFunc();
	})
});

</code></pre>
<p>Things that matter about these files:</p>
<ol>
<li>The name identifier needs to match for each of the tests.  Woosh isn&#8217;t looking for them in order &#8211; it&#8217;s matching on the names to know which should go into each row.  i.e. &#8220;Test name identifier 1&#8243; should be the same in all test files for matching tests for that function.</li>
<li>The first parameter of addTests should be the name you gave the script in the Woosh.libs command, so Woosh can find your script.</li>
<li>The first parameter of woosh.Test is the number of times a test is to be run.  This should be the same for sets of tests for the same thing.  If it&#8217;s not, Woosh will flag up the test as being unfair.</li>
</ol>
<p>The value for iteration times is important.  It&#8217;s large because that&#8217;ll help shake out inaccuracies.  Woosh will run the test for the number of times specified, then divide the result by this number to give the average run time for that function.  You may find that some browsers don&#8217;t cope so well with very large numbers of iterations (uh.. IE, we&#8217;re looking at you) so don&#8217;t go mad with it and think that running it a million times will help your accuracy.  On Glow, we tend to aim to run tests from 100 to 10000 times.</p>
<h3>Saving tests</h3>
<p>You can save one previous set of tests by clicking the floppy-disk icon.  It&#8217;s just stored in a cookie, and will be over-written if you choose to save another column of tests, but it&#8217;s useful if you&#8217;re just doing some small changes and just want to compare before and after.</p>
<h3>The hard work</h3>
<p>Now, of course, it&#8217;s down to your hard work.  Writing the speed tests is really the easy bit, made ever more so by the simplicity of Woosh.  Try your optimisations in the second script and use Woosh to help you benchmark the new script against the old one.  All you need to do is load up the test runner page and hit start.  The results will pop up as they complete and become colour coded as the results are compared.  Keep an eye out for tests that error (they&#8217;ll go slate grey) or test titles that turn yellow (the titles click to expand further test information).  Either of these can indicate that the test isn&#8217;t fair because the iteration value isn&#8217;t matching, the return values aren&#8217;t the same or a method has failed all together.  You should aim to have all your tests running without errors or warnings.</p>
<p>Another thing to note is that you&#8217;ll still need to run all of these tests in all of the browsers you want to optimise for.  You&#8217;ll find massive varience in some cases and it&#8217;ll be up to you to decide where to keep the speed.  Jake&#8217;s <a href="http://jakearchibald.co.uk/jsperformance/">Full Frontal presentation</a> covers some of the things to look out for, so that&#8217;s definitely worth a look over (most importantly, make sure you&#8217;re not running developer tools like Firebug when running your tests, since it&#8217;ll skew your results quite heavily).</p>
<h3>Further reading</h3>
<p>If you want to have a look at some real tests, Glow 2 has a fair few now for some of the basic modules.  They&#8217;re <a href="http://github.com/glow/glow2/tree/master/test/speed/glow/">all up on github</a>, so have a dig around or feel free to clone the repo and run the tests yourself.</p>
<p>The <a href="http://jakearchibald.com/woosh/docs/fullApi/">full API has been documented for Woosh</a>, too, although I believe that might be an exclusive as I cannot see reference to it from the <a href="http://github.com/jakearchibald/Woosh">github docs</a> at the moment.  I recommend taking a look through those to see about running async tests and preparing your code with setup functionality using <code>$preTest</code>, as well as a few other features you might find useful.</p>
<p>On another testing topic, Mat Hampson published an article on <a href="http://www.bbc.co.uk/blogs/webdeveloper/2010/01/ab-testing.shtml">A-B testing on the new BBC Web Developer blog</a>.</p>

]]></content:encoded>
			<wfw:commentRss>http://fberriman.com/2010/01/12/javascript-speed-testing-with-woosh/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
	</channel>
</rss>

