<?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>Reinventing Fire</title>
	<atom:link href="http://schepers.cc/feed" rel="self" type="application/rss+xml" />
	<link>http://schepers.cc</link>
	<description>Technology upside down and backwards</description>
	<lastBuildDate>Tue, 07 Sep 2010 11:47:13 +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>Pointers on Background of SVG Borders on Mutiny</title>
		<link>http://schepers.cc/css-in-svg</link>
		<comments>http://schepers.cc/css-in-svg#comments</comments>
		<pubDate>Sat, 21 Aug 2010 21:37:09 +0000</pubDate>
		<dc:creator>Schepers</dc:creator>
				<category><![CDATA[CDF]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[SVG 2]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://schepers.cc/?p=340</guid>
		<description><![CDATA[<br/>With SVG being integrated more and more into HTML5, both included via &#60;object&#62; and &#60;img&#62; elements, and inline in the same document, some natural questions about SVG and CSS are receiving more focus. This includes box model questions like background and border, and pointer events. I&#8217;m interested in comments from the community on what direction [...]]]></description>
			<content:encoded><![CDATA[<br/><p>With SVG being integrated more and more into HTML5, both included via <code>&lt;object&gt;</code> and <code>&lt;img&gt;</code> elements, and inline in the same document, some <a href="http://lists.w3.org/Archives/Public/www-svg/2010Aug/thread.html#msg28">natural questions</a> about SVG and CSS are receiving more focus.  This includes box model questions like background and border, and pointer events.</p>
<p>I&#8217;m interested in comments from the community on what direction SVG should take.</p>
<p><span id="more-340"></span></p>
<p>It&#8217;s pretty clear that the intent of the SVG 1.1 spec was that the box-model CSS properties must not apply to any SVG elements.  In addition to what the spec states on the subject, my conversations with people who participated in the SVG WG at the time leave me with no doubt on the matter.</p>
<p>The question is, is that the behavior we want?  How hard or easy is it to change that in modern SVG+HTML+CSS implementations?  What is most useful and intuitive for content authors?</p>
<p>In my opinion, we could specify that some aspects of the box model apply without screwing with SVG&#8217;s coordinate-based positioning system.  Here are my initial thoughts on some specific properties:</p>
<h4>Borders</h4>
<p>A borders is different than a stroke.  An SVG element, including any graphical (<code>&lt;rect&gt;</code>, <code>&lt;circle&gt;</code>, <code>&lt;path&gt;</code>, etc.) or container element (<code>&lt;svg&gt;</code>, <code>&lt;g&gt;</code>) can have both a stroke (which conforms to the geometry) and a border (which conforms to the element&#8217;s bounding box).  A common use case is setting the graphics apart from other content, or doing mouseover highlights of an SVG element; for example, when I mouse over or focus a circle, it would be much nicer, and just as semantic, to simply have a CSS property draw a rectangle around that element as a highlight than for me to generate a rectangle based on the bbox and insert that into the DOM, keep a pointer to it, then remove it when I mouse out.</p>
<p>Paint servers and similar resources (gradients, filters, etc.) should not have any border.  Note: <code>&lt;defs&gt;</code> is a non-rendering element, akin to <code>&lt;head&gt;</code>, so no border would be visible for that either, but if the content of a <code>&lt;defs&gt;</code> is <code>&lt;use&gt;</code>d, any border properties would apply in the same manner as for other properties.</p>
<p>The border should not have any effect on the layout or rendering; it would be strictly visual.</p>
<h4>Margin</h4>
<p>No effect on SVG content, but may affect HTML content around that SVG content.  So, an <code>&lt;svg&gt;</code> element with <code>'margin: 20px;'</code>  has a 20-pixel gap around the SVG content, just as if it were <code>&lt;img style="margin: 20px;"/&gt;</code></p>
<p>Alternately, maybe margin only has an effect for <code>&lt;svg&gt;</code> elements; that might be simpler to specify, implement, and understand for content authors.</p>
<h4>Padding</h4>
<p>Again, this has no effect on SVG content, but it does affect how the border is drawn.  This would be a nice way to compensate for thick stroke widths.</p>
<h4>Background</h4>
<p>A background is different than a fill.  Background is much the same as border; it is a rectangle (modulo the border-radius effects) around the shape, based on its geometric bounding box, taking into account padding.</p>
<p>By default, there should be no background color, including for the <code>&lt;svg&gt;</code> element.  Right now, there is a <a href="https://lists.webkit.org/pipermail/webkit-unassigned/2009-July/120301.html ">WebKit bug in Chrome and Safari</a> which renders a white, non-transparent background for SVG fragments or documents; this is a major pain for any content creators trying to use SVG, much like the old Internet Explorer bug on transparency in PNGs.  I hope it receives some attention from the WebKit developers soon.</p>
<p>SVG Tiny 1.2 defines a <a href="http://www.w3.org/TR/SVGTiny12/painting.html#viewport-fill-property"><code>'viewport-fill'</code></a>  and <a href="http://www.w3.org/TR/SVGTiny12/painting.html#viewport-fill-opacity-property"><code>'viewport-fill-opacity'</code></a>.  I think those should be deprecated in favor of <code>'background'</code>  properties; I have no opinion on which should have precedence&#8230; maybe they should be seen as aliases of <code>'background'</code>, if that makes it simpler.</p>
<p>A background on SVG content raises the question of pointer events, which is also relevant to borders.</p>
<h4>Pointer Events</h4>
<p>Should pointer events on the border or background fire on the element itself?  I think that the default should be &#8220;no&#8221;, just to be safe and consistent with older SVG content, but I could easily be persuaded to reverse that.  Either way, there should be a new property or set of properties that can modify this, in a manner consistent with how CSS is defining <code>'pointer-events'</code>.</p>
<p>This touches on the question, asked in a related thread, on whether the <code>&lt;svg&gt;</code> element, by default, should be a proximal event target for pointer events.  My answer on that is a pretty firm &#8220;no&#8221;; if you want to have it as an event target, give it a background, or change the <code>'pointer-events'</code>  value.</p>
<h4>Questions</h4>
<p>A few high level questions:</p>
<ul>
<li><strong>Is this a change from SVG 1.1 and SVG Tiny 1.2?</strong>  Yes.</li>
<li><strong>Is this backwards compatible?</strong>  Kind of.  It introduces new behavior that is not consistent with past behavior, but doesn&#8217;t explicitly change very much.</li>
<li><strong>Does this break existing content?</strong>  Very doubtful.</li>
<li><strong>Is this intuitive for content authors?</strong>  My intuition says yes.</li>
<li><strong>Does this match existing implementations?</strong>  Some, at least.</li>
<li><strong>Does this provide value for content authors?</strong> Yes.</li>
<li><strong>Does this make it harder to implement?</strong>  I don&#8217;t know; I suspect it makes it easier for at least some implementations.</li>
<li><strong>Would defining this improve interoperability?</strong>  Yes.</li>
</ul>
<h4>Conclusion</h4>
<p>I propose we change SVG 2 to explicitly define this behavior.  As the editor of the HTML5 spec, <a href="http://lists.w3.org/Archives/Public/www-svg/2010Aug/0048.html">Hixie seems to imply</a> that this is not for HTML5 to define, and I tend to agree with that, though maybe some informative mention in the HTML5 or CSS specs for how SVG treats margins and padding might be appropriate.  We recently <a href="http://lists.w3.org/Archives/Public/public-cdf/2010Aug/0000.html">formally closed</a> the <a href="http://www.w3.org/2004/CDF/">Compound Document Formats Working Group</a>, which was formed to look at exactly these sorts of questions, and published its specifications as Working Group Notes for posterity; we wanted to be clear about its status.  The CDF WG succumbed to the politics around the reformation of the HTML WG, and probably to good effect overall; but in its absence, we still need to resolve these questions by cooperation between the various groups involved.</p>
<p>I don&#8217;t think this should be any different in standalone SVG files than in SVG files referenced or inlined in HTML.  That would be very unintuitive, in my opinion.</p>
<p>If this is not controversial, I would be happy to put any or all of this in the <a href="http://dev.w3.org/SVG/modules/integration/SVGIntegration.html">SVG Integration spec</a>, which is one of the foundations of SVG 2.  If someone disagrees with this, we&#8217;ll have to talk about it before I start editing the spec.  In either case, it would need to be fleshed out some&#8230; I&#8217;m probably glossing over some possible stumbling blocks in the box model, which I&#8217;d appreciate feedback on.</p>
<p>Please leave a comment if you like my suggestions, if you see a flaw, or have a better suggestion.</p>
<h4 id="update1">Update:</h4>
<p>Just to show what I&#8217;m talking about, I created a sample.  Here is a good example of a bad example; below are 3 instance of the same SVG with the same CSS background and border values, with a border width of 2px.  The first 2 are external files referenced as objects, the third is inline in the HTML (you won&#8217;t see this one unless you are using preview releases of Firefox 4, WebKit, or IE9); the second image also has a padding and margin of 10px.</p>
<p>I tested this in several browsers, and in the referenced cases, the border width increases the image size, spawning scrollbars; I don&#8217;t think that&#8217;s a good outcome&#8230; it should clip the border, just as it does for any graphical overflow&#8230; borders should not contribute to the geometry of SVG images.</p>
<p>In the second case, where I added padding, the argument is less clear, but I still believe that for referenced content, the border and background should not displace the rendered graphics, and should be clipped.  For inline content, it would make sense for the padding and margin to be visible in the rendered document, but it should still not change the geometry of the SVG.</p>
<p><object type="image/svg+xml" width="150" height="150" data="http://www.schepers.cc/svg/blendups/css/border-bg.svg">Please use a modern browser.</object></p>
<p><object type="image/svg+xml" width="150" height="150" data="http://www.schepers.cc/svg/blendups/css/border-bg-padding.svg">Please use a modern browser.</object></p>
<p><svg xmlns="http://www.w3.org/2000/svg" width="150" height="150" viewBox="0 0 50 50" style="border: 2px solid green; background-color: palegreen;"><circle cx="25" cy="25" r="20" fill="orange" stroke="red" style="border: 2px solid gold; background-color: yellow;"/></svg></p>
<p>We&#8217;d need to specify this in order for it to behave the same across browsers (and authoring tools).  So, do people agree or disagree with my conlcusions?</p>
]]></content:encoded>
			<wfw:commentRss>http://schepers.cc/css-in-svg/feed</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>The Map is not Proprietary</title>
		<link>http://schepers.cc/map-not-proprietary</link>
		<comments>http://schepers.cc/map-not-proprietary#comments</comments>
		<pubDate>Fri, 20 Aug 2010 21:34:31 +0000</pubDate>
		<dc:creator>Schepers</dc:creator>
				<category><![CDATA[Maps]]></category>
		<category><![CDATA[Metadata]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://schepers.cc/?p=337</guid>
		<description><![CDATA[<br/>Korzybski remarked that &#8220;the map is not the territory&#8221;, reminding us that we shouldn&#8217;t confuse our mental models for reality. But maps, and data visualizations of all kinds, are really powerful, conveying complex ideas easily, and even shaping (or misshaping) perceptions about facts. This is one reason why decentralization of mapping resources and services is [...]]]></description>
			<content:encoded><![CDATA[<br/><p>Korzybski remarked that &#8220;the map is not the territory&#8221;, reminding us that we shouldn&#8217;t confuse our mental models for reality.  But maps, and data visualizations of all kinds, are really powerful, conveying complex ideas easily, and even shaping (or misshaping) perceptions about facts.  This is one reason why decentralization of mapping resources and services is good; no one organization should control our common maps.</p>
<p>SVG is a natural fit for mapping.  There&#8217;s even a detailed proposal by KDDI&#8217;s Satoru Takagi-sensei for <a href="http://blog.svg-map.com/2009/09/tiling-and-laye.html">tiling, layering, and coordinate resolution</a> that fits on top of SVG, which I&#8217;d like to see standardized.</p>
<p>I&#8217;ve had an idea for a small open-source project for a while, which I&#8217;ve discussed with the brilliant Andreas Neumann of <a href="http://www.carto.net/">Carto.net</a>; he&#8217;s been too busy planning SVG Open every year to help out with it thus far, and I don&#8217;t have the skills to do it without a great investment in time.<br />
<span id="more-337"></span><br />
The idea is simple: there are lots of static SVG maps of various countries, states, etc. that are freely available (for example, on <a href="http://en.wikipedia.org/wiki/Wikipedia:Blank_maps">Wikipedia</a>).  Some effective data visualizations can be made with these (color-coding countries, etc.), but they are by necessity very simple. Content creators can&#8217;t use such maps to pinpoint specific locations (long/lat), because they don&#8217;t know the projection&#8230; the maps are purely visual, not topographical (if that&#8217;s the right word).</p>
<p>There are more heavy-weight solutions, like <a href="http://www.openstreetmap.org/">OpenStreetMap</a>, which is awesome, but more than most people need for very simple location-sensitive webapps.</p>
<p>What I would like to do is have a very simple set of basic maps, with low-to-medium level of detail, all with the same projection, and to provide a Javascript utility that converts back and forth between long/lat and the coordinate space of the image.  There would be one world map, and a map for each country, and a map for each major region within each country (in the US, this would be states).</p>
<p>For example, using this script and some of these premade maps, I could make a little webapp that allows members of a social network (e.g. a developer community, or people who share a hobby) to type in their location (long/lat), and it would stick a &#8220;pin&#8221; in the map at that location.  They could see the high level overview at the world level (100 people in the US, 20 in Japan, 72 in Europe, etc.), and easily drill to the country level (click on US and open that map, showing 20 in California, 5 in North Carolina), and drill down again to the region level (showing the distribution of pins in North Carolina).</p>
<p>It would not go down to the city level, or show regional features like roads or lakes&#8230; that gets too complex, and there are other applications to do that.  However, it would include projection metadata and instructions for each region (which the conversion script might use), and the project would make it possible for someone to export their own GIS data into this simplified format by providing instructions (for, say, ArcGIS).</p>
<p>This is something I think could appeal to people on a very high-level, making SVG easier to understand and use for simple projects like this; I want to improve the reusability of SVG in this way.</p>
<p>And I think the stellar <a href="http://mike.teczno.com/">Michal Migurski </a>of <a href="http://stamen.com/">Stamen Design</a>, and <a href="http://simplegeo.com/">SimpleGeo</a>, have just scooped me.  I haven&#8217;t looked into the details yet, but they just <a href="http://blog.simplegeo.com/post/983045400/announcing-polymaps">announced</a> the launch of <a href="http://polymaps.org/">PolyMaps</a>, a free and simple SVG and Javascript mapping library.  Curse and bless you, you maptastic bastards!</p>
<p>Oh, and in case PolyMaps doesn&#8217;t completely fit what I described above, let talk.</p>
]]></content:encoded>
			<wfw:commentRss>http://schepers.cc/map-not-proprietary/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Favatars</title>
		<link>http://schepers.cc/favatars</link>
		<comments>http://schepers.cc/favatars#comments</comments>
		<pubDate>Mon, 09 Aug 2010 12:23:54 +0000</pubDate>
		<dc:creator>Schepers</dc:creator>
				<category><![CDATA[Meta]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[Website]]></category>

		<guid isPermaLink="false">http://schepers.cc/?p=312</guid>
		<description><![CDATA[<br/>What&#8217;s a favatar? It&#8217;s a favicon! It&#8217;s an avatar! It&#8217;s a portmanteau! Well, really, a favatar is a profile picture hosted at the URL a commenter provides, with the filename favatar.png. I made it up! Okay, so I&#8217;m not the first person to make it up. Apparently, a gentleman by the name of Paul James [...]]]></description>
			<content:encoded><![CDATA[<br/><p>What&#8217;s a favatar? It&#8217;s a <a href="http://en.wikipedia.org/wiki/Favicon" title="Wikipedia article on favicons">favicon</a>!  It&#8217;s an avatar!   It&#8217;s a portmanteau!</p>
<p>Well, really, a favatar is a profile picture hosted at the URL a commenter provides, with the filename <em><a href="http://schepers.cc/favatar.png" title="My favatar">favatar.png</a></em>.  I made it up!</p>
<p><span id="more-312"></span></p>
<p>Okay, so I&#8217;m not the first person to make it up.  Apparently, a gentleman by the name of <a href="http://www.peej.co.uk/projects/favatars.html">Paul James scooped me</a> by a few years, with the same name and a rather similar idea for the same problem.  I had this idea out of the blue, while in Montreal for <a href="http://www.libregraphicsmeeting.org/2009/">Libre Graphics Meeting 2009</a>, and was dismayed to find, again, that there is nothing new under the sun.  So, I put it in my box of maybes.</p>
<p>&#8230; Until this weekend, when I added a WordPress plugin to display images for commenters, to make it easier to follow a thread and humanize the conversation.  Something that has always bothered me about those images is that they usually come from a third-party service, <a href="http://en.wikipedia.org/wiki/Gravatar" title="Wikipedia article on Gravatars">Gravatar.com</a>.  This is actually owned by the same parent company that develops WordPress, and I am sure it&#8217;s a fine service for what it is, but I dislike such centralization where it isn&#8217;t necessary.  There are some also-ran services like Wavatar, monsterID, OpenAvatar, and so forth, but Gravatar (or &#8220;Globally Recognized Avatar&#8221;) is the big one.</p>
<p>What&#8217;s the chief difference between a favatar (note the small <em>f</em> ) and a Gravatar (note the big <em>G</em> )?  A favatar is a convention, not a service.  It&#8217;s distributed.  It&#8217;s cooperative.  It&#8217;s web-like.  It&#8217;s owned and controlled by the person, not (necessarily) by a proxy or host.</p>
<p>The problem I see with Paul&#8217;s original idea around favatars is that it revolves around reusing the favicon.ico, which is typically too small for the purpose of a comment avatar <a href="http://schepers.cc/"><img src="http://schepers.cc/favicon.ico" alt="My favicon" style="vertical-align:middle;"/></a> (though not always: <a href="http://www.peej.co.uk/"><img src="http://www.peej.co.uk/favicon.ico" alt="Paul James' favicon" style="vertical-align:middle; border:0.5px solid gainsboro;"/></a>), and &#8216;*.ico&#8217; files don&#8217;t display in the &lt;img&gt; element in all browsers.  And stylistically, a favicon and an avatar seem to be distinct.  As far as I&#8217;ve seen, despite a few plugins made, and some good <a href="http://noscope.com/journal/2004/12/favatars">conversation</a> about it, the idea hasn&#8217;t really taken off, and the name is just too good to let lie fallow.</p>
<p>So, I put on my hacking mittens, and borrowed code from one or two existing Gravatar WordPress plugins, <em>Easy Gravatars</em> by <a href="http://dougal.gunters.org/">Dougal Campbell</a> and <em>WordPress Gravatars</em> by <a href="http://gulbrandsoy.com/meg/">Rune Gulbrandsøy</a>.  Stir well, bake for 3 hours, and out comes <a href="http://schepers.cc/plugins/favatar/favatar_plus.zip">Favatar Plus</a>, my new WordPress plugin.  It first looks to see if the commenter has supplied a website address, and if they have a file there called <em><a href="http://schepers.cc/contact.vcf" title="My favatar">favatar.png</a></em> (so far, I assume I&#8217;m the only person who does).  Failing that, it falls back to a Gravatar, then to an <a href="http://en.wikipedia.org/wiki/Identicon" title="Wikipedia article on Identicons">Identicon</a> (courtesy of Gravatar.com, actually), and ultimately, as a last ditch effort, falls back to their favicon, if found.</p>
<p>My original idea also included linking their image to a vCard called <em><a href="http://schepers.cc/contact.vcf" title="My vCard">contact.vcf</a></em>, if found at the same base URL, but in testing that, I found it a little unintuitive&#8230; you click it, and suddenly you&#8217;re opening iCal to import a stranger&#8217;s contact info when you just wanted to read their blog.  So, I took that bit out, though I suppose I could make it optional. So, instead, it links to the base URL itself.</p>
<p>I do like the idea of a convention for everyone to expose their &#8220;about me&#8221; info, along with their favatar and contact info and favorite services, at some dereferenceable URL&#8230; a portable profile.  Maybe I&#8217;ll play with that in some later version.</p>
<p>For now, I&#8217;ll see if anyone picks up on this and creates their own <em>favatar.png</em> image.  I&#8217;ll be tickled pink if someone comments on this post and uses their newly minted favatar.</p>
]]></content:encoded>
			<wfw:commentRss>http://schepers.cc/favatars/feed</wfw:commentRss>
		<slash:comments>25</slash:comments>
		</item>
		<item>
		<title>Short Stuff</title>
		<link>http://schepers.cc/short-stuff</link>
		<comments>http://schepers.cc/short-stuff#comments</comments>
		<pubDate>Mon, 09 Aug 2010 04:31:43 +0000</pubDate>
		<dc:creator>Schepers</dc:creator>
				<category><![CDATA[Meta]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[Website]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://schepers.cc/?p=300</guid>
		<description><![CDATA[<br/>I&#8217;ve been doing a lot of website stuff this week. Here&#8217;s some highlights: W3C Working Group Sites A few weeks ago, after long neglect, I finally updated the SVG WG page with a template that better matches the new(ish) W3C site redesign. Each working group has its own eclectic home page, which seems a bit [...]]]></description>
			<content:encoded><![CDATA[<br/><p>I&#8217;ve been doing a lot of website stuff this week.  Here&#8217;s some highlights:<br />
<span id="more-300"></span></p>
<h4 id="wg-sites">W3C Working Group Sites</h4>
<p>A few weeks ago, after long neglect, I finally updated the <a href="http://www.w3.org/Graphics/SVG/">SVG WG page</a> with a template that better matches the new(ish) W3C site redesign.  Each working group has its own eclectic home page, which seems a bit silly to me.  So, I took the template I made and converted the group pages of the <a href="http://www.w3.org/2008/webapps/">WebApps WG</a>, <a href="http://www.w3.org/Graphics/SVG/IG/">SVG Interest Group</a>, and <a href="http://www.w3.org/Graphics/fx/">FX Task Force</a>, and I&#8217;m talking with other W3C team contacts about converting theirs as well, though we&#8217;ll see how many switch over.  From my perspective, having a consistent look&#038;feel is important, and would make the W3C site more usable.</p>
<p>The new template I made is done in HTML5, with the &lt;header&gt;, &lt;footer&gt;, &lt;article&gt;, &lt;section&gt;, &lt;aside&gt;, and &lt;nav&gt; elements (and a reference to <a href="http://code.google.com/p/html5shiv/">Remy Sharp&#8217;s HTML5 shiv</a>), possibly even used correctly; the SVG WG page has a scripted live microblog feed from the <a href="https://twitter.com/svgwg">@svgwg</a> Twitter account, and an inline SVG easter egg (look for it in Firefox and WebKit nightlies).</p>
<h4 id="short">Short Notice</h4>
<p>I have been wanting to write or install a URL shortener on my own site for a while, so I didn&#8217;t have to rely on the brittle third-party services like TinyURL, which I feel don&#8217;t fit the spirit of the Web.  They obscure the link, and act as a massive throttling point.  I looked around a bit before for a custom URL shortener, but never found one that suited my fancy.</p>
<p>But on Saturday, after converting my URLs to have nicer, more meaningful, more RESTful names on the advice of the ever-helpful <a href="http://heldermagalhaes.com/blog/">Helder Magalhães</a>, I was in a mood to tackle the problem, and I found a <a href="http://esev.com/blog/review/host-your-own-url-shortener-10-php-apps-reviewed/">great summary of some of the options</a> by a fellow named Eric Severance.  He described a better list of criteria than I&#8217;d considered, and I went with his top pick, <a href="http://blairwilliams.com/pretty-link/">Pretty Link by Blair Williams</a>.</p>
<p>Despite the silly name, Pretty Link has almost all the features I wanted and then some.  It&#8217;s easy to use, it integrates into my WordPress blog, it lets me pick a meaningful shortname, and I can shorten not only my own blog&#8217;s URLs (lots of WP plugins let you do that), but any random URL I want; it even tracks how many people have followed the links, which to me is mildly interesting, but for people more into their brand would be very handy.  The only thing I&#8217;d like to see is a way to automatically publish a public page that lists all the shortened URLs and the title of each page, along with the expanded original URL; maybe I can hack that in, somehow (and maybe I just haven&#8217;t found it yet).  Just for posterity, I compiled a list of all the links I had tweeted before, and dereferenced them, which you can find on my <a href="http://schepers.cc/expanded_urls.html">expanded URLs page</a>.</p>
<h4 id="avatars">Commenter Avatars</h4>
<p>I&#8217;m playing a bit with my site theme.  I&#8217;m happy with it overall, but I think the column width could be a bit wider; I&#8217;ve already bumped up the font size.  I want to enable nested comment threads, because I think they are easier to read, but I&#8217;ll need to overhaul my theme quite a lot to do so, since it&#8217;s from an older version of WordPress.</p>
<p>In the meantime, I added commenter avatars.  The default image is a Gravatar; as with TinyURL, I don&#8217;t like artificial centralization in avatars, and in this case, it seems particularly silly.  So I cobbled together my own WordPress plugin to take an alternative approach, which I&#8217;ll blog about next time.</p>
]]></content:encoded>
			<wfw:commentRss>http://schepers.cc/short-stuff/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting to the Point</title>
		<link>http://schepers.cc/getting-to-the-point</link>
		<comments>http://schepers.cc/getting-to-the-point#comments</comments>
		<pubDate>Tue, 13 Jul 2010 15:18:15 +0000</pubDate>
		<dc:creator>Schepers</dc:creator>
				<category><![CDATA[SVG]]></category>
		<category><![CDATA[SVG 2]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://schepers.cc/?p=243</guid>
		<description><![CDATA[<br/>SVG paths have a pretty good set of shape commands, enough to let you draw any 2D shape you might want in an authoring tool: horizontal, vertical, and diagonal straight lines, elliptical arc segments, and cubic and quadratic Bézier curves. Béziers are great, giving you precise control over the position and curve interpolation of each [...]]]></description>
			<content:encoded><![CDATA[<br/><p>SVG paths have a pretty good set of shape commands, enough to let you draw any 2D shape you might want in an authoring tool:  horizontal, vertical, and diagonal straight lines, elliptical arc segments, and cubic and quadratic Bézier curves.  Béziers are great, giving you precise control over the position and curve interpolation of each point in a concise format, using control points (&#8220;handles&#8221;), and are easily chained together to create complex shapes.
<p>But let&#8217;s say you have a series of points, and you want to draw a smooth line between them, e.g. for stock data, an audio wave, or a mathematical graphing equation.  Béziers are not as handy there, because not all the points needed to define a Bézier spline are on the curve itself.  Obviously, you can decompose any set of points into a set of Béziers, but that takes math, and who wants to do that?  (Put your hand down, nerd.  I&#8217;m talking to the normals.)
<p>Sometimes, you just want to lay down a set of points, and let the browser draw a smooth curve (unlike polylines, where each segment is just a straight line between the points).  Like this:
<p>  <object type="image/svg+xml" width="420" height="120" data="http://schepers.cc/svg/path/pathpoints.svg">Please use a modern browser.</object><br />
<span id="more-243"></span></p>
<p> Mouse over the line above to see the equivalent cubic Bézier points.  They are off the line. Off the line! Oh, Math, why do you do this to me?</p>
<p>One thing that&#8217;s always bothered me about SVG&#8230; there should be more simple ways of doing things, and this is one of things.  Over the years, I&#8217;ve idly asked math-minded folks about how to achieve this, and the answers always soared right over my pointy little head.  I probably didn&#8217;t ask the question the right way.
<p>But a few months ago, I was chatting with Ben Fry, one of the creators of Processing (the graphics programming language), and he mentioned <a href="http://en.wikipedia.org/wiki/Catmull%E2%80%93Rom_spline#Catmull.E2.80.93Rom_spline" title="Cubic Hermite spline - Wikipedia, the free encyclopedia">Catmull-Rom curves</a> as a possible solution.  I took note of that, and later read up on them; they seemed a pretty good fit for my use case.  In my spare time I looked for any libraries out there to convert Catmull-Rom curves to Bézier splines; I found <a href="http://almightybuserror.com/2009/12/04/drawing-splines-in-opengl.html">references</a> that talked about the the conversion using inverted matrixes, but no simple code to be had.  I&#8217;m lazy, and busy, and the problem wasn&#8217;t urgent, so I kept putting it off.
<p>But in talking to folks about SVG throughout the UK, including designers, the thought kept running through my mind that SVG really does need a better authoring experience (and I don&#8217;t just mean authoring tools, though some nice animation tools would help).  So, when I got back home from vacation, before I really got back into the thick of the dozen other things I should be doing, I put on some music and spent a few hours after work scouring the intartubes for some suitable code.  And as luck would have it, Maxim Shemanarev&#8217;s <a href="http://www.antigrain.com/__code/include/agg_curves.h.html">Anti-Grain Geometry</a> library contained a single simplified conversion matrix and a line of code that did the grunt work in C++, easily ported to Javascript; whip up a custom parser for the &lt;path&gt; syntax, feed it into the convertor function, and you&#8217;ve got yourself a working proof-of-concept.
<p>Here is a scientific chart showing how awesome the SVG &lt;path&gt; element is, with values derived from the overall awesomeness by different path commands, rendered using an experimental Catmull-Rom path command:
<p><object type="image/svg+xml" width="450" height="400" data="http://schepers.cc/svg/path/path-awesomeness.svg">Please use a modern browser.</object></p>
<p>As you can see, adding Catmull-Rom curves would increase the awesomeness of SVG paths by almost 50%.  That is a lot more awesome!
<p>The syntax is pretty intuitive&#8230; it&#8217;s just the command &#8216;R&#8217; followed by a set of coordinate points:</p>
<pre><code>
  &lt;path stroke="#BADA55"
        stroke-width="2"
        fill="none"
        d="M20,380
           R58,342
           100,342
           100,300
           140,250
           190,210
           220,197
           250,184
           280,155
           310,260
           404,20"/&gt;
</code></pre>
<p>And the path syntax isn&#8217;t just used for the &#8216;d&#8217; attribute of &lt;path&gt; elements.  It&#8217;s also used for laying out text-paths, and the shapes of SVG Font glyphs.  And it&#8217;s used in animation, both for motion paths and (in the case of Béziers) for timing functions in the &#8216;keysplines&#8217; easing attribute that controls the rate of animation.  So, making it easier to hit specific points for paths could have side benefits for all those uses as well.
<p>I&#8217;m really interested in feedback from others on the usefulness of this idea.  I&#8217;m not married to the idea of Catmull-Rom curves specifically (<i>Fun fact: Ed Catmull is now the president of the Walt Disney and Pixar animation studios; I believe Rom became an astronaut, was captured by aliens and turned into a cyborg, and is now a Spaceknight</i>), just in the idea of adding this type of point-on-the-path command.  So, if you support the notion of adding this in SVG 2, or have a better idea along the same lines, send an email to the SVG Working Group&#8217;s public list, <a href="mailto:www-svg@w3.org">www-svg@w3.org</a>, to let us know.</p>
<p>The <a href="http://schepers.cc/svg/path/catmullrom2bezier.js">javascript library</a> I wrote to demonstrate this is, of course, open source, available under the MIT or GPL licenses.  Feel free to play around with it, and improve it to make a better proposal.  You&#8217;re welcome to use it for other purposes, but I intended it just as a quick-and-dirty prototype to solicit feedback about extending SVG, so the code isn&#8217;t that great.</p>
<hr />
<h4 id="normals">Update 1:</h4>
<p><a href="http://xn--dahlstrm-t4a.net/">Erik Dahlström</a>, Chief Vectorizer at Opera and chair of the SVG WG, posted a <a href="http://schepers.cc/?p=243#comment-166">visual reply</a>, which WordPress filtered, but I&#8217;ve now <a href="http://schepers.cc/?p=243#comment-166">restored this inline</a>.  Nothing to see here, move along.</p>
<hr />
<h4 id="spiro">Update 2:</h4>
<p>Here is my Catmull-Rom code trying to achieve the nice curves of <a href="http://www.levien.com/spiro/">Spiro</a>, as suggested by Dave Crossland in <a href="http://schepers.cc/?p=243#comment-170">his comment</a>:<br />
<object type="image/svg+xml" width="485" height="277" data="http://schepers.cc/svg/path/spiro.svg">Please use a modern browser.</object></p>
<hr />
<h4 id="spiro-a">Update 3:</h4>
<p>Looking at Spiro curves a bit closer (just the image, not the code), it seems that there are actually different node types illustrated, not simply an undifferentiated set of coordinate points as in my interpretation of the Catmull-Rom algorithm.  This means that, from an syntax standpoint, those segments would need additional parameters in addition to the coordinate points on the curve, which somewhat undercuts the simplicity.</p>
<p>Given that SVG already has a &#8216;Lineto&#8217; command, I set out to see how closely I could match <a href="http://www.levien.com/spiro/spiro.png">the letter &#8220;a&#8221; in Raph Levien&#8217;s example</a>, using just my Catmull-Rom and Lineto segments, and with minimal effort:</p>
<p><object type="image/svg+xml" width="485" height="465" data="http://schepers.cc/svg/path/spiro-a.svg">Please use a modern browser.</object></p>
<p>Mouse over the raster image to hide the SVG path.  There are definite artifacts, and I am running into some known limitations of my script implementation in how it interpolates the last coordinate segment, but with not much effort, I was able to get pretty close.</p>
<p>This is not to belittle Spiro at all&#8230; Spiro generates <a href="http://fontly.com/sandbox/spiro.html">painfully elegant curves</a>.  It&#8217;s just to compare apples to apples.</p>
]]></content:encoded>
			<wfw:commentRss>http://schepers.cc/getting-to-the-point/feed</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Slow News Day</title>
		<link>http://schepers.cc/slow-news-day</link>
		<comments>http://schepers.cc/slow-news-day#comments</comments>
		<pubDate>Tue, 13 Jul 2010 04:38:55 +0000</pubDate>
		<dc:creator>Schepers</dc:creator>
				<category><![CDATA[Meta]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://schepers.cc/?p=273</guid>
		<description><![CDATA[<br/>My last post was slashdotted. Not servers-melting slashdotted, but unusual-volume-of-comments slashdotted. I posted it late on a Saturday night, so I guess they had no other news fit to print. It was interesting, and a little bit exciting, to be linked from Slashdot. I have no great insights, but a few observations. I thought something [...]]]></description>
			<content:encoded><![CDATA[<br/><p>My <a href="http://schepers.cc/?p=160">last post</a> was <a href="http://search.slashdot.org/story/10/07/10/2141224/SVG-and-the-Indexing-of-Web-Standards">slashdotted</a>. Not servers-melting slashdotted, but unusual-volume-of-comments slashdotted.  I posted it late on a Saturday night, so I guess they had no other news fit to print.</p>
<p>It was interesting, and a little bit exciting, to be linked from Slashdot.  I have no great insights, but a few observations.<br />
<span id="more-273"></span></p>
<ol>
<li>I thought something was odd when I started getting comments from outside the SVG community, which is the only place I can imagine I have any sort of fame or notoriety.  So I followed a <a href="http://twitter.com/#search?q=SVG%20and%20The%20Indexing%20of%20Web%20Standards">Twitter reference</a> on SVG back to its source.  I&#8217;m sure this is the most I&#8217;ve been referenced in Twitter, too&#8230; though most weren&#8217;t retweets of my own pointer to my blog.  Interesting to see how Twitter and Slashdot interact, and how aggregators like Slashdot are the primary focus of links from Twitter, moreso than the original source.  Some aggregators retweeted the story several times at intervals, I reckon to get more attention from those who blinked the first few times (srsly, smashingmag? Retweeting it 11 times? Okay).</li>
<li>I was surprised that &#8220;indexing SVG&#8221; was the topic that got the attention of the Slashdot community.  I didn&#8217;t expect anyone to be particularly interested in my little study, outside the rarefied Web Standards community, which is who it was written for.  My guess is that it may have seemed a bit controversial, because someone from the W3C looked with a critical eye at Google (a Giant Corporation, and one of our members).  Everyone loves scandal!  I&#8217;ve learned my lesson&#8230; now all my posts will attack some company.  (If you are interested in some press-grabbing attention, my fee for insulting your company on this blog is very reasonable.)</li>
<li>In true Slashdot fashion, it&#8217;s pretty obvious that many of those who bothered to comment clearly didn&#8217;t read my blog post, or didn&#8217;t get my central point; it&#8217;s not surprising, since that wasn&#8217;t really the audience I expected (and I do ramble a bit).  Some folks tried to turn it into an SVG vs. Flash debate, which entirely missed the point.  That said, there were some thoughtful comments that I replied to on Slashdot and on my blog.</li>
<li>I spent much more time following up on my post than I expected.  I&#8217;m glad it wasn&#8217;t a weekday, where it may have gotten even more attention.  Still, I hope it did give some people food for thought.</li>
<li>Either I&#8217;m too prolix (guilty!), or Twitter has reduced the average attention span to&#8230; ooh, shiny!  Adobe&#8217;s JD took a friendly dig at me <a href="http://schepers.cc/?p=160#comment-160">in his comment</a>, and <a href="http://twitter.com/jdowdell/status/18298074498">maybe</a> on <a href="http://twitter.com/jdowdell/status/18377241765">Twitter</a>, too.  My post was a very long one, simply because I had no leisure to make it shorter.  I prefer to thoroughly explore an idea and provide context and evidence when I bother writing at all.  I suppose that is old fashioned.  I&#8217;ll work on it.</li>
</ol>
<p>Sorry, I have to go now&#8230; my fifteen minutes are up.</p>
]]></content:encoded>
			<wfw:commentRss>http://schepers.cc/slow-news-day/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Formata Non Grata</title>
		<link>http://schepers.cc/formata-non-grata</link>
		<comments>http://schepers.cc/formata-non-grata#comments</comments>
		<pubDate>Sat, 10 Jul 2010 15:39:19 +0000</pubDate>
		<dc:creator>Schepers</dc:creator>
				<category><![CDATA[Metadata]]></category>
		<category><![CDATA[Microformats]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Semantics]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://schepers.cc/?p=160</guid>
		<description><![CDATA[<br/>Recently, a browser implementer asked me for examples of SVG. He was having trouble finding good examples of SVG in use, particularly as parts of an HTML document. This question has come up again and again, actually, and it always vexes me. I&#8217;ve been active in the SVG community for close to a decade, and [...]]]></description>
			<content:encoded><![CDATA[<br/><p>Recently, a browser implementer asked me for examples of SVG.  He was having trouble finding good examples of SVG in use, particularly as parts of an HTML document.  This question has come up again and again, actually, and it always vexes me.  I&#8217;ve been active in the SVG community for close to a decade, and I&#8217;ve seen thousands of amazing SVG files (and many more of mediocre to average quality), but somehow they seem to have disappeared or bitrotted over the years.  Some of those files only worked with the slightly-unstandard Adobe SVG Viewer, or didn&#8217;t quite work with Firefox&#8217;s incomplete support, I know, but surely not all of them.  Where is all the great SVG content I remember, the games and GUIs and design and development?  Where are all those files to be found?</p>
<p>I hear some browser implementers say that people just don&#8217;t use SVG.  Intuitively, this feels false to me, based on my own experience.  But could it be true?</p>
<p><span id="more-160"></span></p>
<p>The statistical insignificance of SVG is often cited by some people in the WHATWG, based on a large dataset of Web content indexed by Google.  In the WHATWG, where HTML5 started, great stock is placed on statistics, particularly <a href="http://code.google.com/webstats/index.html">those conducted</a> by the editor, Ian Hickson, a Google employee.</p>
<p style="text-align: center;"><a title="Based on a study of one BILLION documents!" href="http://lists.whatwg.org/htdig.cgi/whatwg-whatwg.org/2006-June/006726.html"><img class="aligncenter size-full wp-image-167" title="DrHTML5" src="http://schepers.cc/wp-content/uploads/2009/07/DrHTML5.png" alt="DrHTML5" /></a></p>
<p>There&#8217;s no question about it: HTML is the king of the Web.  I did some rough calculations, similar to claims I&#8217;ve heard before, by counting the number of returns for HTML files versus SVG files.  A <a title="SVG filetype search on Google" href="http://www.google.com/search?q=filetype%3Asvg">search for the filetype &#8220;.svg&#8221;</a> yields around 18,165,500 hits on Google.  (Note that this doesn&#8217;t count the false hits on the word &#8220;SVG&#8221; from St. Vincent and the Grenadines, Stan Van Gundy, the Sexy Valley Girls, or any of the numerous other bizarrities that the acronym stands for.)  SVG content makes up just 0.106% of all Web content, by my rough estimation.  Flash is almost 5 times as common as SVG.  That&#8217;s pretty grim for SVG.</p>
<p>But wait, let&#8217;s put that into perspective.  Flash is about 4.8 times more common than SVG.  HTML is roughly 838 times more common than SVG.  838 times.  Flash content comprises approximately 0.52% of all Web content, and HTML is roughly 189 times more common than  Flash.  So, Flash is clearly much more popular than SVG (even when you consider that some large percentage of Flash content is actually just encapsulated video content, these days).  But that doesn&#8217;t mean that nobody&#8217;s using SVG.  Nearly 20 million documents is pretty impressive, actually, especially given the fact that SVG has been hindered by a lack of native support in browsers for most of its existence (and more recently, even poor support by the Adobe plugin for IE), and a lack of common authoring tools for dynamic content (Inkscape is an excellent vector editor, but it doesn&#8217;t yet do animation or interactivity).</p>
<p>Eighteen million documents.  That&#8217;s a lot of files.  So, given that, why  is it so hard to find SVG content?</p>
<p>Maybe because the most popular search engine in the world, Google, doesn&#8217;t index SVG.</p>
<h3>Indexing SVG</h3>
<p>A long time ago, back in 2002, I made a <a title="Discussion of SVG text search and translation" href="http://schepers.cc/svgaccessibility.html">page</a> discussing my experiments with text search and translation.  The results were not very encouraging, but I reckoned it was just a matter of time.  I optimistically wrote to Google to encourage them to enable text search and translation of SVG files.</p>
<p>8 years down the line, things don&#8217;t seem to have changed much on that front.</p>
<p>To be fair, many SVG files don&#8217;t contain any text at all, not even a &lt;title&gt; element, so indexing them might not yield much.  But many other files do have at least a title, and SVG infographics and webapps usually have at least labels that might be meaningful as search terms.  Often SVG files are even text-heavy.</p>
<p>It&#8217;s not that Google doesn&#8217;t take note of the files&#8230; obviously, you can search for the filetype, or in the worst case, the specific file URL, and normally get back positive results.  But Google doesn&#8217;t seem to search the contents of the SVG files and present them in the relevant result set.  To test this, I tried searching for a few files that I knew to have indexable text content.</p>
<p>As an example, I looked for some SVG files on my little (long out-of-date) SVG promotion site, SVG-Whiz.com.  First, I searched for a file I knew to have a cogent block of text, my explanation of the distinctions between &#8216;display&#8217;, &#8216;visibility&#8217;, and &#8216;opacity&#8217;, called <a href="http://svg-whiz.com/svg/HideShow.svg">HideShow.svg</a>:  </p>
<p><object type="image/svg+xml" width="360" height="400" data="http://svg-whiz.com/svg/HideShow.svg">Please use a modern browser.</object></p>
<p>This file has been hosted on my site since 2003, I&#8217;ve gotten several positive comments about it, and a <a href="http://www.google.com/search?q=http%3A%2F%2Fsvg-whiz.com%2Fsvg%2FHideShow.svg">direct search for that file URL</a> turns up a few hits linking to it, so it&#8217;s seems like a reasonable candidate for indexing.  But what are the results of my in-site <a href="http://www.google.com/search?q=site%3Asvg-whiz.com%20opacity">Google search for the word &#8216;opacity&#8217;</a>?  Okay, that just turned up the explanation page linking to the SVG file in question.  Fair enough, maybe Google doesn&#8217;t treat SVG as a &#8220;document&#8221; file, only as an image.  So, how about an <a href="http://www.google.com/images?q=site%3Asvg-whiz.com%20opacity">image search for the same term</a>?  Nada.  So, maybe Google doesn&#8217;t consider SVG to be either a &#8220;document&#8221; nor an &#8220;image&#8221;&#8230; let&#8217;s <a href="http://www.google.com/search?q=site%3Asvg-whiz.com+opacity+filetype%3Asvg">search for the word &#8216;opacity&#8217; in the site &#8216;svg-whiz.com&#8217; with the filetype &#8216;svg&#8217;</a>.  As specific as that is, at the time of writing, I got not a single resulting hit.</p>
<p>Google can find the files&#8230; why doesn&#8217;t it do something with them?</p>
<h3>Comparison of File Extension Frequency</h3>
<p>So, what criteria does Google use to decide which file types it is going to index?</p>
<p>The <a title="Google's Filetype FAQ" href="http://www.google.com/help/faq_filetypes.html">Google FAQ on search filetypes</a> lists 23 file extensions that it indexes, and says:</p>
<blockquote><p><span style="line-height: 28.5px;">There are 13 main file types searched by Google in              addition to standard web formatted documents in HTML. The most common              formats are PDF, PostScript, Microsoft Office formats [...] </span><span style="line-height: 28.5px;">Google is also scouring the Web for additional file            types that are very rare. You may see them pop up in your results from            time to time.</span><span style="line-height: 28.5px;"> [...] </span><span style="line-height: 28.5px;">PDF formatted files are the most popular after HTML files.            PostScript and Microsoft Word files are also fairly common. The other            file types are relatively uncommon by comparison. </span></p></blockquote>
<p>So, I took the liberty of conducting my own survey of the relative frequency of various filetypes, as collected by Google itself, by using the <span style="line-height: 28.5px;">&#8220;filetype:extension&#8221;</span> query term. I&#8217;m not totally convinced this is at all an accurate means to collect and analyze the data, but it&#8217;s what I had at hand.</p>
<p>I put together a table that compares the different file types that Google explicitly mentions.  (I thought about representing the data as an SVG barchart, but I was afraid it wouldn&#8217;t be indexed&#8230; just kidding, the sheer volume of HTML files would make every other bar just a blip.)</p>
<p>I also threw in some other filetypes of interest, including some with functional similarity to SVG, such as Illustrator, PhotoShop, and Silverlight.  I expected non-Web filetypes such as Illustrator&#8217;s &#8220;*.ai&#8221; to be disproportionately underrepresentated in the results compared to their actual usage, and that was indeed borne out; it&#8217;s hard to know what percentage of SVG files are intended for and presented on the Web (I&#8217;ve spoken to many Inkscape users who only use SVG for print or local hard-drive, which surprised me), but I would guess that it is far, far more heavily tilted toward Web usage&#8230; but I still thought it would be interesting to compare.</p>
<p>What did surprise me was how &#8220;*.svg&#8221; compared to such ubiquitous file extensions as &#8220;*.txt&#8221;, and those for Excel, PowerPoint, and the venerable PostScript.  To be frank, the results make me question my methodology, or perhaps the accuracy of Google&#8217;s reporting.</p>
<table style="text-align:right; background-color:#A2953A; border:none; border-collapse:collapse; border-spacing:0px;" border="0" cellpadding="2px">
<tbody>
<tr style="background-color:#414602; color:#FFFFE3; border-collapse:separate;">
<th style="text-align:center;">File Type</th>
<th style="text-align:center; border-left:#FFFFE3 2px solid;">File Extension</th>
<th style="text-align:center; border-left:#FFFFE3 2px solid;">Number of Results</th>
<th style="text-align:center; border-left:#FFFFE3 2px solid;">Introduction</th>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;" rowspan="5">HyperText Markup Language</th>
<td style="color:#7A7822;">total</td>
<td><strong>16,574,700,000</strong></td>
<td>1991</td>
</tr>
<tr>
<td>html</td>
<td>8,180,000,000</td>
<td></td>
</tr>
<tr>
<td>php</td>
<td>7,010,000,000</td>
<td></td>
</tr>
<tr>
<td>asp</td>
<td>1,370,000,000</td>
<td></td>
</tr>
<tr>
<td>xhtml</td>
<td>14,700,000</td>
<td></td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;">Adobe Portable Document Format</th>
<td>pdf</td>
<td><strong>281,000,000</strong></td>
<td>1993</td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;" rowspan="3">Shockwave Flash</th>
<td style="color:#7A7822;">total</td>
<td><strong>87,923,300</strong></td>
<td>1996</td>
</tr>
<tr>
<td>swf</td>
<td>87,900,000</td>
<td></td>
</tr>
<tr>
<td>fla</td>
<td>23,300</td>
<td></td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;">Microsoft Word</th>
<td>doc</td>
<td><strong>58,500,000</strong></td>
<td>1983</td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;" rowspan="3">Text</th>
<td style="color:#7A7822;">total</td>
<td><strong>32,757,000</strong></td>
<td>1982</td>
</tr>
<tr>
<td>txt</td>
<td>32,600,000</td>
<td></td>
</tr>
<tr>
<td>ans</td>
<td>157,000</td>
<td></td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;" rowspan="3">Scalable Vector Graphics</th>
<td style="color:#7A7822;">total</td>
<td><strong>18,165,500</strong></td>
<td>1999</td>
</tr>
<tr>
<td>svg</td>
<td>18,100,000</td>
<td></td>
</tr>
<tr>
<td>svgz</td>
<td>65,500</td>
<td></td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;">Microsoft Excel</th>
<td>xls</td>
<td><strong>12,500,000</strong></td>
<td>1982</td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;">Microsoft PowerPoint</th>
<td>ppt</td>
<td><strong>7,790,000</strong></td>
<td>1984</td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;">Rich Text Format</th>
<td>rtf</td>
<td><strong>5,130,000</strong></td>
<td>1987</td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;">Adobe PostScript</th>
<td>ps</td>
<td><strong>2,440,000</strong></td>
<td>1982</td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;">Adobe Illustrator</th>
<td>ai</td>
<td><strong>135,000</strong></td>
<td>1986</td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;">OpenOffice.org</th>
<td>odt</td>
<td><strong>135,000</strong></td>
<td>1999</td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;">MacWrite</th>
<td>mw</td>
<td><strong>35,600</strong></td>
<td>1984</td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;">Adobe PhotoShop</th>
<td>psd</td>
<td><strong>21,800</strong></td>
<td>1988</td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;" rowspan="3">Silverlight</th>
<td style="color:#7A7822;">total</td>
<td><strong>8,493</strong></td>
<td>2003</td>
</tr>
<tr>
<td>xaml</td>
<td>8,180</td>
<td></td>
</tr>
<tr>
<td>xap</td>
<td>313</td>
<td></td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;">CorelDRAW</th>
<td>cdr</td>
<td><strong>8,310</strong></td>
<td>1989</td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;" rowspan="4">Microsoft Works</th>
<td style="color:#7A7822;">total</td>
<td><strong>2,266</strong></td>
<td>1987</td>
</tr>
<tr>
<td>wks</td>
<td>1,190</td>
<td></td>
</tr>
<tr>
<td>wps</td>
<td>801</td>
<td></td>
</tr>
<tr>
<td>wdb</td>
<td>275</td>
<td></td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;" rowspan="9">Lotus 1-2-3</th>
<td style="color:#7A7822;">total</td>
<td><strong>1,981</strong></td>
<td>1983</td>
</tr>
<tr>
<td>wks</td>
<td>1,190</td>
<td></td>
</tr>
<tr>
<td>wk1</td>
<td>571</td>
<td></td>
</tr>
<tr>
<td>wki</td>
<td>89</td>
<td></td>
</tr>
<tr>
<td>wk3</td>
<td>47</td>
<td></td>
</tr>
<tr>
<td>wk4</td>
<td>41</td>
<td></td>
</tr>
<tr>
<td>wku</td>
<td>33</td>
<td></td>
</tr>
<tr>
<td>wk5</td>
<td>6</td>
<td></td>
</tr>
<tr>
<td>wk2</td>
<td>4</td>
<td></td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;">Microsoft Write</th>
<td>wri</td>
<td><strong>1,200</strong></td>
<td>1985</td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;">Lotus WordPro</th>
<td>lwp</td>
<td><strong>148</strong></td>
<td>1995</td>
</tr>
<tr style="background-color:#7A7822; border-top:#FFFFE3 5px solid;">
<th style="text-align:left; vertical-align:top;">All Web Content</th>
<td></td>
<td><strong>17,081,255,598</strong></td>
<td>1989</td>
</tr>
</tbody>
</table>
<p><strong>Caveat:</strong> I originally compiled this information a few months ago, and when rechecking it for accuracy, I got a surprising result.  Normally, the <a title="Google search for SVG files" href="http://www.google.com/search?q=filetype:svg">Google search for filetype:svg</a> returned 18,100,000 hits, but late one night, it returned only 2,000,000 hits; now, my most recent check showed around 4,300,000 hits.  Jumping around in the results for an explanation, I noticed that there is a lot of duplication of Wikipedia content, and since Wikipedia uses SVG, that might account for some discrepancy.  One possibility is that  the lower figure represents 2 million unique documents, which are duplicated in a lot of places; the same should be said of any HTML content, and probably to a lesser extent of Flash content.  I don&#8217;t know if this is the right conclusion, but it would be an interesting data point.  Even with the much more modest figure of 2 million documents, I still think that represents an impressive body of work, particularly in light of the fact that SVG documents are normally authored individually, not through forum or blog software, or exporting or reformatting of email and text content as HTML.</p>
<h3>Conclusions</h3>
<p>I don&#8217;t think this is some grand conspiracy by Google to suppress SVG.  Simple neglect is much more plausible.  They don&#8217;t seem to see the value in indexing SVG.  But the end result is the same: SVG seems to be statistically underrepresented in terms of access through Google searches, and thus, it is harder to find SVG content. </p>
<p>Relying on the results of a search engine that doesn&#8217;t index SVG, to draw conclusions about how many people are using SVG is not statistically sound.   This is a bit like conducting a phone survey of English speakers in China, and concluding that nobody speaks with a Southern US accent.  I reckon y&#8217;all might could see the problem with that methodology if you lived here in North Carolina.</p>
<p>SVG is at least as plentiful on the Web, by Google&#8217;s own reckoning, as most other file types that Google does index. Search engines, Google included, should index SVG files. They should read the text inside the file, and if the file is referenced in an HTML page, they should associate those keywords with the SVG file, just as they do with raster images. SVG files should display in image searches, as well. Here&#8217;s a list of the kind of useful content that can be gleaned from most SVGs:</p>
<ul>
<li><strong>file name: </strong>while pretty primative, many files give some clue as to their contents in their name</li>
<li><strong>text elements</strong><strong>: </strong>there are several elements in SVG that contain text to be rendered to the screen, including &lt;text&gt;, &lt;tspan&gt;, &lt;textPath&gt;, and &lt;textArea&gt;, and the content should be indexed as if it were text in any other format</li>
<li><strong>embedded HTML: </strong>HTML (and other markup) can be embedded inline in SVG, and search engines should look for that and index it as they would standalone HTML content</li>
<li><strong>links: </strong>Google, and probably most other modern search engines, give weight to files that are linked from other files, and files referenced from SVG content should benefit in the same way; the @xlink:title and @rel can help define the relationship between the files</li>
<li><strong>descriptive elements: </strong>like HTML, SVG has a &lt;title&gt; element that doesn&#8217;t display, but adds to the information about its parent file or element, and SVG also has a &lt;desc&gt; element for a longer description</li>
<li><strong>metadata: </strong>SVG can contain RDF, RDFa, microformats, and ARIA markup, which search engines are starting to pick up on these days; these metadata can reveala lot about a file, from its license information to structured content (like calendars or dates or contact info) to intent (such as ARIA roles, which will soon be expanded to include things like different chart types)</li>
</ul>
<p>And the SVG Working Group would be happy to work with any search engine developers to make improvements to SVG 2 to help make indexing SVG content easier or more fruitful.</p>
<p>I&#8217;m not trying to pick on Google here (though I do note that a <a href="http://www.bing.com/search?q=svg+opacity+svg-whiz.com">Bing search for &#8216;svg opacity svg-whiz.com&#8217;</a> listed the SVG file as the first hit), I&#8217;m just noting a discrepancy and an opportunity for improving the experience that people have on the Web with regards to SVG.  At the very least, SVG should be recognized by Google as a legitimate file type, rather than a formata non grata.</p>
<h4>Update</h4>
<p>Rob Russell delivered great news to us in his SVG Open keynote.  As of August 31, 2010, <a href="http://googlewebmastercentral.blogspot.com/2010/08/google-now-indexes-svg.html?utm_source=feedburner&#038;utm_medium=twitter&#038;utm_campaign=Feed%3A+blogspot%2FamDG+%28Official+Google+Webmaster+Central+Blog%29">Google now indexes SVG</a> and delivers it in some search results.   Kudos to Google for stepping up!  I&#8217;m very pleased&#8230; solid results only 6 weeks later.  (I guess I should thank Slashdot, too.)</p>
]]></content:encoded>
			<wfw:commentRss>http://schepers.cc/formata-non-grata/feed</wfw:commentRss>
		<slash:comments>37</slash:comments>
		</item>
		<item>
		<title>Successful Launches</title>
		<link>http://schepers.cc/successful-launches</link>
		<comments>http://schepers.cc/successful-launches#comments</comments>
		<pubDate>Sat, 15 May 2010 02:47:34 +0000</pubDate>
		<dc:creator>Schepers</dc:creator>
				<category><![CDATA[Real Life]]></category>
		<category><![CDATA[Travel]]></category>

		<guid isPermaLink="false">http://schepers.cc/?p=239</guid>
		<description><![CDATA[<br/>Today has been a good day for launches! In my last post, I mentioned the successful launch of the W3C Audio Incubator Group, which I&#8217;ve been working on for a few weeks. The second launch is a bit more visceral. When I realized that there would only be a few more space shuttle launches, Megan [...]]]></description>
			<content:encoded><![CDATA[<br/><p>Today has been a good day for launches!  In my last post, I mentioned the successful launch of the W3C Audio Incubator Group, which I&#8217;ve been working on for a few weeks.</p>
<p>The second launch is a bit more visceral.  When I realized that there would only be a few more space shuttle launches, Megan and I decided that we would try to see one if we could.  This occurred to me about a month ago, but I wasn&#8217;t sure we could fit it into our schedule.  But this week, Megan had to cancel a long biketrip, and that opened up a spot for us to drive down.  So, we drove ten and a half hours to Cape Canaveral, slept a few hours in a cheap hotel, and got up early (for us, 8:00 AM is really early) to drive to Jetty Park, which was already crowded by the time we got there.</p>
<p>But we still landed a good spot right on the waterfront across from the launch site.  A few low clouds threatened the launch early on, but it cleared up by early afternoon.  A passing Korean car cargo ship gave us a little anxiety, fearing it might block the view, but it cleared in plenty of time.</p>
<p>Finally, the countdown blared out of someone&#8217;s radio, and the whole waterfront chimed in. 5&#8230; 4&#8230; 3&#8230; 2&#8230; 1&#8230;</p>
<p>We were pretty far away, but the rocket flame was impressively bright in person, and when the sound reached us, we could almost feel it.  This is the final flight of the Atlantis, which makes me a bit sad.  I&#8217;m ambivalent about retiring the shuttles&#8230; single-launch rockets are probably a cheaper option&#8230; still, it&#8217;s drawing to the end of an era, and I hope we keep pushing forward.  Gauss-gun launch rails, anyone?</p>
<p>So, it was a successful launch, which makes me glad.  Definitely worth the trip.</p>
<p>We did come away from it with reddened, painfully sensitive skin.  I assert that this is rocketburn, not sunburn.  Need a higher Rocket Protection Factor next time.</p>
]]></content:encoded>
			<wfw:commentRss>http://schepers.cc/successful-launches/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Web Audio Goes to Eleven</title>
		<link>http://schepers.cc/web-audio-goes-to-eleven</link>
		<comments>http://schepers.cc/web-audio-goes-to-eleven#comments</comments>
		<pubDate>Fri, 14 May 2010 18:58:42 +0000</pubDate>
		<dc:creator>Schepers</dc:creator>
				<category><![CDATA[Audio]]></category>
		<category><![CDATA[CDF]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://schepers.cc/?p=212</guid>
		<description><![CDATA[<br/>I&#8217;m really excited about W3C&#8217;s new public Audio Incubator Group, just launched today, and open for collaborators, innovators, and instigators. Go take a look for yourself, and see if you can contribute. To celebrate the occasion, here&#8217;s a simple example of an experimental audio inteface, in the world&#8217;s first (and worst) audio synthesizer in SVG [...]]]></description>
			<content:encoded><![CDATA[<br/><p>I&#8217;m really excited about W3C&#8217;s new public <a href="http://www.w3.org/2005/Incubator/audio/">Audio Incubator Group</a>, just launched today, and open for collaborators, innovators, and instigators.  Go take a look for yourself, and see if you can contribute.</p>
<p>To celebrate the occasion, here&#8217;s a simple example of an experimental audio inteface, in the world&#8217;s first (and worst) audio synthesizer in SVG (you&#8217;ll need a <a href="https://wiki.mozilla.org/Audio_Data_API#Obtaining_Code_and_Builds">special Minefield build</a> to use it).  Just click on the keyboard&#8230; it&#8217;s pretty rough still, but it shows some of the potential:</p>
<p><iframe src="http://schepers.cc/svg/keyboard.svg" class="aligncenter" scrolling="no" frameborder="0" width="478" height="190">Please use FF1.5+, Opera 9+, WebKit/Safari3.0+, or IE9+</iframe><br />
<em>(<a href="http://schepers.cc/svg/keyboard.svg">standalone SVG file</a>)</em></p>
<p>For some background, read on after this break&#8230;<br />
<span id="more-212"></span></p>
<h3>Background</h3>
<p>Years ago, I was one of several SVG developers interested in doing for audio what SVG did for graphics, and we <a href="http://tech.groups.yahoo.com/group/svg-developers/message/28154">talked</a> a bit about a format we called  <a href="http://uk.groups.yahoo.com/group/SynthML/">SynthML</a>.  The old Adobe SVG viewer included an audio element for MP3 playback, and I found it really useful for adding subtle sounds for button mouseovers, clicks, and other UI effects, so the idea of programmatic control of music on the Web had intrigued me for some time (anyone remember Thomas Dolby&#8217;s Beatnik?), for enhancing user interfaces, adding ambient background music, and providing full fledged music webapps. The SynthML effort fizzled out, and while there are some interesting music markup languages (most notably <a href="http://www.musicxml.org/xml.html">MusicXML</a>, which is more like the MathML of music), there hasn&#8217;t been much traction beyond simple recording playback.</p>
<p>That&#8217;s why I was so psyched when I saw what <a href="http://alistairgmacdonald.com/">Alistair MacDonald</a>, <a href="http://vocamus.net/dave/?cat=25">David Humphrey</a>, <a href="http://twitter.com/corban">Corban Brook</a>, and a few others were up to while attending a  Processing.js community event at <a href="http://loft.bocoup.com/">Bocoup</a>.  David hacked up a <a href="https://wiki.mozilla.org/Audio_Data_API#Obtaining_Code_and_Builds">special build</a> of Gecko to add script access to the raw audio stream of the HTML5 &lt;audio&gt; element, and Al, Corban, and friends were building <a href="http://weblog.bocoup.com/web-audio-all-aboard">cool demos</a> on top of it.</p>
<p>I immediately knew I wanted to see this as a part of the native functionality of the Web platform, across browsers.  In some ways, it&#8217;s the last major missing piece from the open Web&#8230; the ability to view source and hack sound, the last commonly digitizable sensorium. I also knew that I wanted the use cases and requirements to come from the larger community, the musicians and UI designers and developers who will ultimately be the ones using this functionality to sound out the depths of what&#8217;s possible on the Web (okay, I&#8217;m corny).  So, I talked with Corban, David, and Al, and we agreed that a public discussion forum would be the best way to connect with this community, to get them talking and experimenting and building and sharing.</p>
<p>Chris Blizzard of Mozilla was there too, co-sponsoring the event, and he was extremely supportive of getting this work started at W3C.  I wrote up a <a href="http://www.w3.org/2010/04/audio/audio-incubator-charter.html">charter</a> for a public incubator group, and started knocking on doors of the browser vendors, our other members, and the wider community who might be stakeholders, to drum up interest.  Pretty quickly, I got support from folks at the University of Rio (PUC-Rio), BBC, and Google; currently, a W3C Incubator Group takes a minimum of three W3C members to kick it off, though once it&#8217;s started, anyone can join.  With that nicety taken care of, W3C management approved the charter, and the new W3C Audio Incubator Group (or Audio XG) was launched today!</p>
<h3>Joining the Audio XG</h3>
<p>I invite anyone interested in audio, music, speech synthesis, games, or other related topics to get involved, <a href="http://www.w3.org/2005/Incubator/audio/wiki/Join_the_Audio_Incubator">join the Audio XG</a>, and start shaping the future of Web audio on the mailing list, and chat on the <a href="irc://irc.w3.org:6665#audio">#audio</a> IRC channel (irc.w3.org, port 6665, channel #audio).  Incubator participation is free and open to anyone who wants to help out.</p>
<h3>About the SVG Synth</h3>
<p>My SVG synthesizer is a true product of the Web.  I know next to nothing about music&#8230; I can&#8217;t play an instrument, can&#8217;t read music, don&#8217;t know music theory&#8230; I love music, but I&#8217;m a consumer, not a creator.  I&#8217;d love to change that, when I have time, but I&#8217;ll settle for now for enabling others.</p>
<p>So, when I decided to make something with the audio API, naturally my first thought was to do something I didn&#8217;t know how to do, for which I&#8217;m totally unqualified: create a synthesizer in SVG.</p>
<p>I started with the HTML example from the documentation for the <a href="https://wiki.mozilla.org/Audio_Data_API">experimental audio API</a> on the Mozilla wiki, and converted it to SVG (with a few missteps along the way).  As it turns out, the HTML5 audio interface is exposed in Gecko (the Firefox engine) even when there is no HTML content.  This was good news for me.  It made it even easier to programmatically create sound with it.  I suspect that this is something that lies outside any current specification, but it should be codified somewhere.</p>
<p>Next, I looked for a piano keyboard in SVG; I found a few on <a href="http://upload.wikimedia.org/wikipedia/commons/c/c0/Klaviatur-3-en.svg">Wikimedia Commons</a>, but they were not quite what I wanted (and in typical Inkscape fashion, were a little bloated), so ultimately I just made my own, which was trivial to do.</p>
<p>Next, I had to understand which notes each key should sound.  So I read a <a href="http://www.musictheory.halifax.ns.ca/3keyboard.html">lesson on keyboard basics</a>, which sufficed for my purpose.</p>
<p>Then I had to figure out what the frequency of each note is in Hertz (Hz), which is what the audio API understands.  It was no surprise that someone had published just such a <a href="http://www.phy.mtu.edu/~suits/notefreqs.html">table corresponding notes to frequency</a>, with the companion <a href="http://www.phy.mtu.edu/~suits/NoteFreqCalcs.html">equations for deriving them</a>.  </p>
<p>To put the pieces together, I took the simplest possible approach: I handcoded the keyboard (I could have instantiated it with script, because it&#8217;s very deterministic, but I favor declarative markup that can be tweaked in an authoring tool); I assigned an id to each key based on the note (C4, Af0-Bb0, etc., where &#8220;f&#8221;==&#8221;flat&#8221; and &#8220;b&#8221;==&#8221;sharp&#8221;, and the number denotes the octave); I then created an associative array with the note-id as the index and the frequency as the value, so I could look it up with the key&#8217;s id; then it was just a matter of sending the frequency to the script from the HTML example, and adding a duration timer.</p>
<p>Finally, just as a decorative flourish, I found a partial musical staff with a treble clef and beamed eighth-note, <a href="http://upload.wikimedia.org/wikipedia/commons/a/ac/Musical_notes.svg">in SVG, of course</a>, and tweaked it to my liking.</p>
<p>My tools? A Web browser with the audio API enabled (libre source), a search engine, and a text editor.</p>
<p>Voilà!  From knowing almost nothing about formal music (I&#8217;d never even heard the term &#8220;middle C&#8221; before), I created a simple synthesizer, and learned a bit about music along the way.  That&#8217;s the power of the open Web.  That&#8217;s why I&#8217;m so pumped up about this new focus on audio.  This one goes to 11.</p>
]]></content:encoded>
			<wfw:commentRss>http://schepers.cc/web-audio-goes-to-eleven/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stumbling Towards a Graphical Workflow</title>
		<link>http://schepers.cc/stumbling-towards-a-graphical-workflow</link>
		<comments>http://schepers.cc/stumbling-towards-a-graphical-workflow#comments</comments>
		<pubDate>Mon, 08 Mar 2010 10:10:34 +0000</pubDate>
		<dc:creator>Schepers</dc:creator>
				<category><![CDATA[Authoring Tools]]></category>
		<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[SVG Basics]]></category>
		<category><![CDATA[Standards]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[Technical]]></category>
		<category><![CDATA[W3C]]></category>
		<category><![CDATA[Work]]></category>

		<guid isPermaLink="false">http://schepers.cc/?p=190</guid>
		<description><![CDATA[<br/>I&#8217;m working with a professional designer, Michael, on some graphics for my upcoming MIX presentation.  I&#8217;ve worked with designers before on various projects, some SVG, some traditional Web design, but this is my first time working on an SVG project with someone who never used SVG before, and it&#8217;s been an interesting experience, which I [...]]]></description>
			<content:encoded><![CDATA[<br/><p>I&#8217;m working with a professional designer, Michael, on some graphics for my upcoming <a title="SVG session at Microsoft MIX conference" href="http://live.visitmix.com/MIX10/Sessions/EX30">MIX presentation</a>.  I&#8217;ve worked with designers before on various projects, some SVG, some traditional Web design, but this is my first time working on an SVG project with someone who never used SVG before, and it&#8217;s been an interesting experience, which I thought I&#8217;d jot down for anyone interested.</p>
<p>Both of us have been busy with other projects, and since we are in different places (me in Chapel Hill NC, him in Atlanta GA), we have only gotten to touch base a few times.  Michael has delivered some first drafts of the graphics, which look lovely, and I decided to dig into the underlying code, confident that I could trim down the file size and thus help browser performance.</p>
<p>My personal graphical editor of choice is Inkscape, which is a fine tool for all its warts (though it&#8217;s a little painful on Mac, where it is hosted as an X-11 application); typically, though, I create SVG either programmatically with a script or manually with a text editor (yes, I know that&#8217;s crazy&#8230; but it <a title="A sad example of hand-coded SVG art" href="http://svg-whiz.com/svg/shinydonkey/shinyDonkey.svg">can be done</a>).  Michael, being a professional designer, uses Adobe Illustrator, and I am keen to have him use the tools he is most comfortable with.  Since I want SVG to be used by mainstream designers, I want to understand how their tools work and what their workflow is like.</p>
<p>So, in order to make sure that we can roundtrip the files as seamlessly as possible, while still leveraging the features of SVG, I set about today to establish a workflow with Illustrator, TextMate (my go-to text editor, with a custom SVG code template bundle), Firefox, and its native debugger extension Firebug (with its handy &#8220;Inspect Element&#8221; context-menu selection).  My goal: to make reusable icons out of some of the graphical assets in the larger image, to be referenced by SVG&#8217;s &lt;use&gt; element.<span id="more-190"></span></p>
<h3>The &lt;use&gt; Element</h3>
<p>Some earlier graphical languages, especially special-use ones such as CAD languages for engineering, architecture, or mapping, included a native symbol library.  These would normally include a variety of arrowheads, iconic symbols, line styles (dotted, dashed, etc.), and other graphical primitives.  The problem with this idea is that such symbol libraries were by necessity limited in the number of symbols, and usually only had one or two styles for each basic symbol. Not very extensible.  SVG took a different approach.</p>
<p>SVG has the ability to &#8220;clone&#8221; an image, to reposition or resize it, and to change some of its styling.  This works on a shape or collection of shapes, whether the image is defined in the same document, or in an external SVG file.  The mechanism to do this is the &lt;use&gt; element, and it looks like this:</p>
<blockquote>
<pre>&lt;use xlink:href="#myImageId"
     x="100" y="300"
     transform="scale(1.5)"
     fill="cornflowerblue"/&gt;</pre>
</blockquote>
<p>Translated into English, this code says,</p>
<blockquote><p>Find the image with the <em>id</em> of &#8220;myImageId&#8221;, and copy it.  Move it 100 pixels to the right, and 300 pixels down.  Increase its size by half again.  Oh, and if it doesn&#8217;t already have a color, make it blue. Thanks.</p></blockquote>
<p>(That final &#8220;/&#8221; is the part that says &#8220;thanks&#8221;, a quaint courtesy missing from HTML5.  SVG was specified in a gentler time.)</p>
<p>Thus, designers can provide their own symbols, in the style appropriate to the task at hand.  There are several good SVG clipart libraries that allow SVG authors to share their symbols and simple reusable images.</p>
<p>You can see that if you draw an image of a balloon, with several paths (the bubble, the knot, the string, and maybe a highlighting accent) and some special graphical effects (a gradient, and perhaps a filter effect) all amounting to a dozen lines of code, and you want to reuse this balloon, you don&#8217;t want to redraw it each time; it would be a waste of effort, and result in a much larger file.  For print, this may not be as much of an issue, but for a Web-based format, it takes longer to download and uses more memory in the browser, resulting in poorer performance.  So, instead of rebuilding a score of balloons, or copying and changing the original image description, you can simply make one basic model, sans color, and reference that multiple times, with a different color and size.  It&#8217;s easier to do, and each extra balloon only increases the size of the file by a small amount, much smaller than adding dozens of duplicates.</p>
<p>To really take advantage of this feature takes a different way of thinking about the design.  A clever designer can even create several image components and recombine  them into composites with even more variation.  Of course, it&#8217;s not always appropriate for every project, but my current project has quite a few duplicate images.</p>
<p>This is a feature supported by every browser with native SVG (though not every one yet allows you to reference images in external documents).  So, it&#8217;s a safe and natural feature for an SVG authoring tool to utilize in its SVG output.</p>
<blockquote><p><strong>Best Practice:</strong> Make liberal use of &lt;use&gt;.</p></blockquote>
<h3>&lt;use&gt; It and Lose It</h3>
<p>Illustrator doesn&#8217;t support &lt;use&gt;.</p>
<p>Or rather, it does recognize it, and render it&#8230; but it promptly converts any instances of the &lt;use&gt; element to simple verbose copies of the referenced image.  I could not find any way to create an instance of &lt;use&gt;.</p>
<p>Also, when creating gradients, Illustrator seems to get overly specific about the position and dimensions (width, height) of the gradient, needlessly yoking them to a specific element at a particular location and of a particular size.  SVG allows you to define a gradient once and reuse it among several shapes, decreasing the number of gradients; Illustrator should make better use of this feature, and so should Inkscape.</p>
<p>This is not a tool created with the Web in mind.</p>
<p>Because of this quirk, my current file size is about 6 or more times what it needs to be.  Let&#8217;s see how we can work around that.</p>
<h3>Symbolic Gestures</h3>
<p>I spent quite a bit of time &#8211;hours, truth to tell, because I&#8217;m an Illustrator newbie&#8211; isolating individual images (trees, benches, etc.) that were used through the graphic as a whole.</p>
<p>When I make &#8220;symbols&#8221; (for lack of a better word), I like to find their positioning anchor &#8211;that is, the point at which they are most usefully positioned&#8211; and set that to the {0,0} point, so there are no unpleasant surprises when placing the symbol.  For most symbols, this is the centerpoint of the symbol; if I have an icon (a badge, a logo), I will position it smack dab at the point in my graphic that it should be applied, relative to other images.  For other symbols, it is one of the extremities, where it will meet up with another shape&#8230; for a tree this would be the bottom of the trunk where it sprouts from the ground, for an arrowhead it would be the base where it it attaches to a line.  I try to pick the most intuitive anchor for each symbol.</p>
<p>When you drag a shape to a new location, as I did for creating anchors, Illustrator converts the path  or attribute values to their new coordinates, rather than simply  applying a transformation.  This is something that Inkscape gets wrong  (at least, last time I checked).  Nested transforms are harder for  developers to work with than simple coordinates.  So, kudos to  Illustrator on this one.</p>
<p>Each symbol is best enclosed within a group&#8230; in SVG, this is a &lt;g&gt; element (SVG also has a &lt;symbol&gt; element, but in practice, I don&#8217;t think it&#8217;s worth much).  Grouping allows the designer to collect all the constituent parts of the image together for greater portability.</p>
<p>When a designer works, if they are anything like me, they tweak a bit here and there, sketching out the rough shape, working on another part of the big picture, then focus on adding details.  A problem arises for a developer who has to subsequently dig into the resulting code&#8230; elements are added to the document in the order they are created, so a bunch of shapes that appear to be one symbol might be scattered throughout the document, and might even be in different layers.</p>
<blockquote><p><strong>Best Practice:</strong> Group early, group often.  Create  graphical objects, and think about graphical / document structure.  Your developer co-workers will thank you.</p></blockquote>
<p>Being the non-designer developer I am, my first instinct was to group the elements in a text editor, and as a clumsy first attempt to find the different elements, I used Firebug to inspect each element to find its id or unique data I could use in a text search in the text editor, but the different parts were too scattered for this to be effective; pretty quickly, I turned to Illustrator myself to do the grouping visually.</p>
<p>The process for converting these graphics into symbols was made much clumsier by the selection mechanism of Illustrator.  When things are grouped in Illustrator, it logically selects all the bits of that grouped image.  The problem is that it also does this with layers, as well as groups; you can &#8220;drill down&#8221; from a layer into an individual group, but when you are first trying to select a set of images that aren&#8217;t already grouped, this can be twiddly and frustrating.  Illustrator also defines far too many nested groups, decreasing their usefulness and creating markup cruft that makes later programming harder. Using the selection marquee (the draggy box), you can more easily select the constituent parts of the image, but be careful of any background elements.</p>
<blockquote><p><strong>Best Practice:</strong> When creating symbols, select the elements you want as part of that symbol, either with the selection marquee or with shift+click.  Right-click on the selection, and choose &#8220;Group&#8221; to group the elements, which should also group any gradients, filters, clipping paths, etc. that the shapes use; in the Layers dialog, you will see the graphics collected under a new group labeled &#8220;&lt;group&gt;&#8221;; double-click this, and give it a meaningful name.  (Note: you might need to right-click again and choose &#8220;Isolate Selected Group&#8221; in order to the collect the gradients and other graphical effects into the group; these are not shown in the Layers dialog, so I wasn&#8217;t sure at what point they are included in the group.)</p></blockquote>
<h3>&#8220;Let Me Tell You What I Think You Mean&#8221;</h3>
<p>As I isolated each image, I deleted extraneous shapes that weren&#8217;t part of any symbol.  I made each symbol into its own file, just to keep them tidy.  Each symbol looked great by itself, but when I finally recomposed all the symbols together, the colors were all wrong!  A little digging revealed the problem&#8230; Illustrator changes the ids of the <em>&#8220;paint servers&#8221;</em> &#8211;referenceable graphical effects like  gradients and filters&#8211; as you delete other shapes.  So, when I recombined the symbols into a single file, some of the gradient ids overlapped and defaulted to the first instance&#8230; which screwed up the colors.  This is a portability and maintenance nightmare.</p>
<p>Illustrator tried to be a little too clever here.  Like the way it unwinds &lt;use&gt; references and discards the &lt;use&gt; element, it doesn&#8217;t play well with a designer-developer roundtripping workflow.  I ran into many such cases where it discarded changes I had edited by hand.  I tried to resize the document dimensions in my text editor, but when I loaded it in Illustrator, made some changes, and saved it again, it scaled down my graphics (which I&#8217;d just explicitly scaled up) and changed the viewport to a much smaller set of dimensions.  Hey, Illustrator, if I wanted it that size, that&#8217;s the size I would have made it!  Finally, I gave up, and set the dimensions I wanted in a new file I created in Illustrator itself, and copy-pasted from one Illustrator window into the new document, which seems to have taken.  I don&#8217;t like programs which introduce inconsistency into a workflow.</p>
<p>What are you smirking about, Inkscape?  You pull the same kind of nonsense!</p>
<h3>Copy-Paste Error</h3>
<p>After all this tweaking, I ended up with more or less what I want to start with: a document with the dimensions I need, with a set of reusable symbols at the right scale.</p>
<p>But when I tested it out by selecting a symbol on the canvas, copying it, and pasting it in its new location, I was disappointed to find that Illustrator copied the parts of the symbol, but not the grouping&#8230; it just added the individual parts of the graphic directly in the target layer.</p>
<p><strong>FAIL! </strong></p>
<p>I messed around a bit more with the interface, and through luck, I stumbled on a different way of selecting the symbol.  By toggling a selection button for the group in the Layers dialog, and copying that (Ctrl/Cmd+C only&#8230; Illustrator doesn&#8217;t provide a right-click menu on items in the Layers dialog list), I could paste the group.</p>
<blockquote><p><strong>Best Practice:</strong> Copy and paste symbols from the Layers dialog to preserve their logical structure.</p></blockquote>
<p>This is a far cry from having a &lt;use&gt; element, but I plan to apply a post-processing step to the final document, replacing duplicates with &lt;use&gt; references.  Luckily, Illustrator didn&#8217;t give the pasted copy a completely random id,  but simply appended an incremented number to the original symbol id, so this should be fairly easy.</p>
<p>My next step is to turn the new document over to Michael, my long-suffering designer, and see if any of this makes sense to him, or if he will come to his senses and throttle me for imposing all this developer madness on him.</p>
<h3>To Be Continued&#8230;</h3>
<p>I recognize that my own inexperience with Illustrator is probably behind some of my missteps (the full extent of which I have shielded from you, dear reader).  On the other hand, a fresh pair of eyes can often spot flaws that could be eliminated where an experienced hand would simply repeat the same mistakes.</p>
<p>This project is far from over, and as I refine my workflow, I&#8217;ll report back what I discover.  Some of what I learn may inform future versions of SVG.  Other parts should be changes to the authoring tools.  Hopefully some of it will help help designers and developers work around issues in creating SVG with the tools they use today.</p>
]]></content:encoded>
			<wfw:commentRss>http://schepers.cc/stumbling-towards-a-graphical-workflow/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
