<?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>CodeDread Blog &#187; JavaScript</title>
	<atom:link href="http://www.codedread.com/blog/archives/category/technology/software/web/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codedread.com/blog</link>
	<description></description>
	<lastBuildDate>Mon, 02 Jan 2012 15:30:52 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Binary Tools for JavaScript</title>
		<link>http://www.codedread.com/blog/archives/2011/09/19/binary-tools-for-javascript/</link>
		<comments>http://www.codedread.com/blog/archives/2011/09/19/binary-tools-for-javascript/#comments</comments>
		<pubDate>Mon, 19 Sep 2011 05:23:45 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.codedread.com/blog/?p=1026</guid>
		<description><![CDATA[As promised, I have a tiny thing to announce here. I recently split off and refactored the code that deals binary data in kthoom into a new open source project: http://bitjs.googlecode.com/, Binary Tools for JavaScript. The faster and faster JavaScript engines in modern browsers and the rise of new technologies like Typed Arrays, Web Workers, [...]]]></description>
			<content:encoded><![CDATA[<p><img xmlns="http://www.w3.org/1999/xhtml" width="100" height="100" style="float:right" src="http://codedread.com/clipart/tools.svgz" alt="I want to believe. SVG as an image format." />As promised, I have a tiny thing to announce here.  I recently split off and refactored the code that deals binary data in <a href="http://kthoom.googlecode.com/">kthoom</a> into a new open source project: <a href="http://bitjs.googlecode.com/">http://bitjs.googlecode.com/</a>, Binary Tools for JavaScript.</p>
<p>The faster and faster JavaScript engines in modern browsers and the rise of new technologies like <a href="http://www.khronos.org/registry/typedarray/specs/latest/">Typed Arrays</a>, <a href="http://dev.w3.org/html5/workers/">Web Workers</a>, and <a href="http://www.w3.org/TR/FileAPI/">the File APIs</a> mean that browsers can actually be used to read in binary formats completely on the client-side (as long as native performance isn&#8217;t a requirement).</p>
<p>For now the library includes two main capabilities:</p>
<ul>
<li>streams for reading in bits and bytes from a Typed Array</li>
<li>unarchiving zip, rar or tar files (that&#8217;s right, you can unzip and unrar in JavaScript now)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2011/09/19/binary-tools-for-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>kthoom!</title>
		<link>http://www.codedread.com/blog/archives/2010/04/12/kthoom/</link>
		<comments>http://www.codedread.com/blog/archives/2010/04/12/kthoom/#comments</comments>
		<pubDate>Mon, 12 Apr 2010 12:55:51 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[RIA]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[comics]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://www.codedread.com/blog/?p=832</guid>
		<description><![CDATA[[clipart]Sometimes I get an idea and I just have to see it through to a point where it will let my brain go. At work Thursday we were all slobbering over Steve&#8217;s iPad and someone brought up how cool the Marvel app is. I had to admit it was much nicer than any piece of [...]]]></description>
			<content:encoded><![CDATA[<p><object type="image/svg+xml" width="100" height="100" style="float:right" data="http://codedread.com/clipart/kthoom.svgz">[clipart]</object>Sometimes I get an idea and I just have to see it through to a point where it will let my brain go.  At work Thursday we were all slobbering over <a href="http://nuthatch.com/blog/">Steve&#8217;s</a> iPad and someone brought up how cool the <a href="http://marvel.com/news/comicstories.11835.download_the_official_marvel_comics_ipad_app">Marvel app</a> is.  I had to admit it was much nicer than any piece of software I&#8217;d used for viewing comics before on my laptop.</p>
<p>In the meantime, I&#8217;ve been carefully watching WebKit creep <a href="https://bugs.webkit.org/show_bug.cgi?id=32624">closer</a> and <a href="https://bugs.webkit.org/show_bug.cgi?id=36567">closer</a> to implementing the <a href="http://www.w3.org/TR/FileAPI/">W3C File API</a> (Go Kinuko!).  Something I&#8217;ve been eagerly waiting for more browsers to do so you can open up local files in <a href="http://svg-edit.googlecode.com/">SVG-edit</a>.</p>
<p>And then it hit me. <span id="more-832"></span></p>
<p>Why not a comic book reader done directly in the browser?</p>
<p>In case you don&#8217;t know, <a href="http://en.wikipedia.org/wiki/Comic_Book_Archive_file">comic book archive files</a> are just ZIP or RAR files containing JPEG images.  Browsers can handle images.  Some browsers can now handle opening local files.  Even binary ones.  So theoretically you could write unzip/unrar in pure JavaScript, extract the JPEGs, turn them into data: URIs and shove them into an &#60;image&#62; element.  You can even do the unzipping in a separate thread using <a href="http://www.whatwg.org/specs/web-workers/current-work/">Web Workers</a>.</p>
<p>Theoretically.</p>
<p><a href="http://code.google.com/p/kthoom/">kthoom</a> was how far I was able to get in a weekend.</p>
<p>Some limitations:</p>
<ul>
<li><a href="http://code.google.com/p/kthoom/issues/detail?id=10">Unzipping is slow</a>.  None of the code has been optimized yet and I&#8217;m probably doing a lot of really stupid things.</li>
<li>Only supports CBZ files, <a href="http://code.google.com/p/kthoom/issues/detail?id=9">not CBR files</a> at the moment &#8211; I am accepting patches</li>
<li>Unzipping is <em>really</em> slow.  I need to <a href="http://code.google.com/p/kthoom/issues/detail?id=8">provide visual progress reporting</a> from the Web Worker thread, I know.</li>
<li>kthoom will crash Firefox 3.6 about half the time.  Firefox nightly (3.7) seems to handle it just fine.  I opened <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=558621">this bug</a>.</li>
<li>Did I mention that unzipping is slow?</li>
</ul>
<p>If I&#8217;m honest, this was really an exercise to see just how easy/hard it would be to do something like this in the browser &#8211; and to get some hands-on experience with Web Workers.  And hey, I&#8217;m not the <a href="http://jsxgraph.uni-bayreuth.de/wp/">first</a> or even <a href="http://github.com/tlrobinson/zipjs">second</a> person to think of doing unzip/deflate in JavaScript either.</p>
<p>It was my first experience writing JavaScript to handle binary files.  It was fun.  It took a weekend.  </p>
<p>Some essential tools:  Firebug, a hex editor, pen &#38; paper, a clear mind, patience.</p>
<p>Now swinging my attention back to stuff I should be working on&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2010/04/12/kthoom/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>To And Fro</title>
		<link>http://www.codedread.com/blog/archives/2010/03/31/to-and-fro/</link>
		<comments>http://www.codedread.com/blog/archives/2010/03/31/to-and-fro/#comments</comments>
		<pubDate>Wed, 31 Mar 2010 13:45:23 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[RIA]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[canvas]]></category>

		<guid isPermaLink="false">http://www.codedread.com/blog/?p=782</guid>
		<description><![CDATA[[clipart]Issue 70 has been open for awhile now. In fact it&#8217;s one of just a handful of two-digit bugs left in SVG-edit. Now that all browsers have heralded support for SVG into the future, one might argue that the need for this bug will evaporate in a couple years. However, one would be wrong. First, [...]]]></description>
			<content:encoded><![CDATA[<p><object type="image/svg+xml" width="100" height="100" style="float:right" data="http://codedread.com/clipart/recycling.svgz">[clipart]</object><a href="http://code.google.com/p/svg-edit/issues/detail?id=70" title="Convert SVG to PNG">Issue 70</a> has been open for awhile now.  In fact it&#8217;s one of just a handful of two-digit bugs left in <a href="http://code.google.com/p/svg-edit/issues/list">SVG-edit</a>.  Now that all browsers have heralded support for SVG into the future, one might argue that the need for this bug will evaporate in a couple years.  However, one would be wrong.  First, there are lots of mobile browsers out there.  Second, in some cases it could be easier to just tell the browser how to draw a collection of dots rather than mathematical instructions (think thumbnails).  So how to solve it?<span id="more-782"></span></p>
<p>One thought that occurred to me is if I can shove the SVG into a HTML5 Canvas element, I can then call <a href="http://dev.w3.org/html5/canvas-api/canvas-2d-api.html#dom-canvas-todataurl">toDataURI()</a> on it to generate a PNG.  Unfortunately only <a href="http://lists.w3.org/Archives/Public/public-html/2007Oct/0320.html">Opera seems to have experimented</a> with loading SVG into a Canvas directly.  Also, there are many effects that can be done in SVG that cannot be done in Canvas (filters, fonts, and more).</p>
<p>The <a href="http://dev.w3.org/html5/canvas-api/canvas-2d-api.html#section-canvas-interface-element">Canvas2D API</a> does mention that in the future, the svg:image element may support <a href="http://dev.w3.org/html5/canvas-api/canvas-2d-api.html#the-canvas-interface-element">the CanvasElement DOM interface</a>.  I&#8217;m anticipating Microsoft to announce &#60;canvas&#62; support for IE9 later this year and probably to support this interface on svg:image elements.  It&#8217;s one way they can innovate on the web standards front while they continue to catch up to other modern browsers.</p>
<p>This would be good, but why only the <a href="http://www.w3.org/TR/SVG11/struct.html#ImageElement">svg:image element</a>?  I&#8217;d argue that any element that contains some geometry could gain the toDataURI() method (particularly useful would be the &#60;svg&#62; element here).</p>
<p>Until such time as browsers all get in sync, there are other options.  <a href="http://canvg.googlecode.com/">canvg</a> is one such option and I&#8217;ve been dutifully raising bugs and writing teeny patches but there&#8217;s a long ways to go for a robust solution.</p>
<p>Ultimately this is another case of <a href="http://www.codedread.com/blog/archives/2009/06/27/oh-the-things-youll-learn/">why am I doing something in script that all browsers already know how to do</a>?  You really have to think long-term in the web space, don&#8217;t you? <img src='http://www.codedread.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Other ideas?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2010/03/31/to-and-fro/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>SVG-edit: The Secret Sauce</title>
		<link>http://www.codedread.com/blog/archives/2010/01/22/svg-edit-the-secret-sauce/</link>
		<comments>http://www.codedread.com/blog/archives/2010/01/22/svg-edit-the-secret-sauce/#comments</comments>
		<pubDate>Fri, 22 Jan 2010 03:26:05 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[Google]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[RIA]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svg-edit]]></category>

		<guid isPermaLink="false">http://www.codedread.com/blog/?p=589</guid>
		<description><![CDATA[[clipart]SVG-edit has far exceeded my expectations in the seven months since I&#8217;ve been working on it. The people I&#8217;ve met there have been amazing and it&#8217;s been really fun to watch the project grow both in members and in capabilities. Without the people working on it, people like Alexis (now the top contributor) and wormsxulla [...]]]></description>
			<content:encoded><![CDATA[<p><object type="image/svg+xml" width="100" height="100" style="float:right" data="http://codedread.com/clipart/svgedit.svgz">[clipart]</object><a href="http://svg-edit.googlecode.com/">SVG-edit</a> has far exceeded my expectations in the seven months since I&#8217;ve been working on it.  The people I&#8217;ve met there have been amazing and it&#8217;s been really fun to watch the project grow both in members and in capabilities.  Without the people working on it, people like <a href="http://a.deveria.com/">Alexis</a> (now the top contributor) and <a href="http://vertex.corpsmoderne.net/main.php?g2_itemId=114">wormsxulla</a> (whip-cracker on UI translations) and others, there wouldn&#8217;t <em>be</em> a project &#8211; that much is obvious.  But would you like to know the secret sauce in the SVG-edit project?  Of course you would.<span id="more-589"></span></p>
<p><object type="image/svg+xml" width="100" height="100" style="float:right" data="http://codedread.com/clipart/googlecode.svgz">[clipart]</object>One of the surprising factors in SVG-edit has been using <a href="http://googlecode.com/">GoogleCode</a> in combination with <a href="http://svnbook.red-bean.com/">Subversion</a>.  Let me tell you why:</p>
<h3 id="linked">Linked Information</h3>
<p>Everything is an issue in SVG-edit.  This is the way we keep track of things to do.  This is the way other people discover things they can work on.  This is the way we prioritize features for a release.  This is the way we identify <a href="http://code.google.com/p/svg-edit/issues/list?can=2&#038;q=label%3AGood-First-Bug">good first bugs</a> for new hackers to work on.  This is the way we sort problems into browser-specific, usability, interoperability categories.  This is even where we put requirements and design decisions.</p>
<p>Making almost everything an issue is good because GoogleCode has some magic that detects revision commit messages and message comments and inter-links the two.  For instance, if I fix <a href="http://code.google.com/p/svg-edit/source/detail?r=1275">issue 436</a>, I might do:</p>
<p><code>$ svn ci -m "Fix Issue 436: Fixed the foo thing"</code></p>
<p>This shows up in GoogleCode <a href="http://code.google.com/p/svg-edit/source/detail?r=1275">here</a> and provides you a link to the issue.</p>
<p>Now in the issue itself, I can mark it as Fixed and mention the revision that fixed the issue:</p>
<p><code>Fixed in r1275</code></p>
<p>Once again, GoogleCode provides a link to the revision when you <a href="http://code.google.com/p/svg-edit/issues/detail?id=436#c1">look at the bug</a>.</p>
<p>This kind of tracking takes a little bit of discipline, but it&#8217;s not that bad and the payoff is worth it.  It really helps other developers keep tabs on what&#8217;s been solved where and how.</p>
<h3 id="host-it">Host It</h3>
<p>Since SVG-edit is a 100% client-side application (i.e. everything happens in the browser, no server component), and since Subversion allows you to <a href="http://svnbook.red-bean.com/en/1.5/svn.advanced.props.file-portability.html#svn.advanced.props.special.mime-type">specify MIME types</a> by setting properties on files, we can convince GoogleCode to host the entire project in runnable form for the purposes of demo-ing the code.</p>
<p>This applies to the trunk as well as any branches and tags.  For instance, you can actually see the evolution of SVG-edit over time:</p>
<ul>
<li><a href="http://svg-edit.googlecode.com/svn/branches/1.0/svg-editor.html">SVG-edit 1.0</a></li>
<li><a href="http://svg-edit.googlecode.com/svn/branches/2.0/svg-editor.html">SVG-edit 2.0</a></li>
<li><a href="http://svg-edit.googlecode.com/svn/branches/2.1/editor/svg-editor.html">SVG-edit 2.1</a></li>
<li><a href="http://svg-edit.googlecode.com/svn/branches/2.2/editor/svg-editor.html">SVG-edit 2.2</a></li>
<li><a href="http://svg-edit.googlecode.com/svn/branches/2.3/editor/svg-editor.html">SVG-edit 2.3</a></li>
<li><a href="http://svg-edit.googlecode.com/svn/branches/2.4/editor/svg-editor.html">SVG-edit 2.4</a></li>
</ul>
<p>Or you can look at the <a href="http://svg-edit.googlecode.com/svn/trunk/editor/svg-editor.html">latest trunk build</a>.</p>
<p>Or you can host the file in a web page by using <code>&#60;iframe&#62;</code> element like <a href="http://www.codedread.com/blog/archives/2009/06/19/embed-an-svg-editor-on-your-web-page/">I&#8217;ve talked about before</a>.</p>
<p>The fact that GoogleCode servers host the repo and also support web serving the content is immensely powerful:  it means we don&#8217;t have to administer a source code repository and we don&#8217;t have to pay for a dedicated server or bandwidth costs to demo the software.  Furthermore, because it&#8217;s a browser-based app, users don&#8217;t have to download anything, they can try out the code right on the spot.</p>
<p>Incidentally this is also one of the strengths of a web app in the first place:  Zero downloads.</p>
<h3 id="regression">Tracking Down A Regression</h3>
<p>GoogleCode&#8217;s hosting of the svn repo doesn&#8217;t stop at branches/tags.  In fact, you can look at <strong>ANY</strong> revision in the browser directly.  Coupled with the fact that we don&#8217;t really require a build step means that it is very easy to track down a regression.</p>
<p><a href="http://git-scm.com/">git</a> has this cool feature called <a href="http://www.kernel.org/pub/software/scm/git/docs/git-bisect.html">bisect</a> that allows you to hunt down when a regression occurred by seeking forward/backward across revisions in increasingly smaller increments, building each revision and testing until you find the first revision in a branch that exhibited a problem.</p>
<p>We can do this much easier in SVG-edit using Subversion on GoogleCode.  Let&#8217;s say one day we notice a problem in the trunk and we&#8217;re at r1200.  Well, we might decide to try out the editor at <a href="http://svg-edit.googlecode.com/svn-history/r1000/trunk/editor/svg-editor.html">revision 1000</a> to see if the problem existed then.  If the problem did not exist, we hop ahead 100 revisions to <a href="http://svg-edit.googlecode.com/svn-history/r1100/trunk/editor/svg-editor.html">r1100</a> &#8211; was the problem present then?  If so, hop back 50 revisions to <a href="http://svg-edit.googlecode.com/svn-history/r1050/trunk/editor/svg-editor.html">r1050</a>.  Repeat in the browser until you isolate the earliest revision where the problem occurred, then add a comment to the issue and go <a href="http://code.google.com/p/svg-edit/source/detail?r=1060">review that revision</a>.</p>
<p>Totally amazing capability and no more difficult than changing a revision number in the browser location bar.  I have to credit <a href="http://narendra.techfandu.org/">Narendra Sisodya</a>, the project founder, with uncovering that little nugget. </p>
<h3 id="non-nirvana">Not a Nirvana</h3>
<p>There are still some grips/nits I have with GoogleCode+Subversion:</p>
<ul>
<li>Being able to serve gzipped JavaScript would be great</li>
<li>Being able to display the current revision number in SVG-edit</li>
<li>The wiki markup needs significant improvements</li>
</ul>
<p>But this is free hosting and project management software, so I can&#8217;t complain too loudly. <img src='http://www.codedread.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2010/01/22/svg-edit-the-secret-sauce/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>MIX 10k Code Challenge += SVG</title>
		<link>http://www.codedread.com/blog/archives/2010/01/14/mix-10k-code-challenge-svg/</link>
		<comments>http://www.codedread.com/blog/archives/2010/01/14/mix-10k-code-challenge-svg/#comments</comments>
		<pubDate>Thu, 14 Jan 2010 15:56:59 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[Games]]></category>
		<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://blog.codedread.com/archives/2010/01/14/mix-10k-code-challenge-svg/</guid>
		<description><![CDATA[[clipart]I came across the MIX 10k Coding Challenge on the weekend, and on a whim I decided to submit one of my old SVG demos to the contest. The 10k challenge&#8217;s tagline is &#8220;What could you create for the Web if you had only 10 kilobytes of code?&#8221;. The rules didn&#8217;t explicitly say I could [...]]]></description>
			<content:encoded><![CDATA[<p><object type="image/svg+xml" width="100" height="100" style="float:right" data="http://codedread.com/clipart/villain.svgz">[clipart]</object>I came across the <a href="http://mix10k.visitmix.com/">MIX 10k Coding Challenge</a> on the weekend, and on a whim I decided to submit one of my old SVG demos to the contest.  The 10k challenge&#8217;s tagline is &#8220;What could you create for the Web if you had only 10 kilobytes of code?&#8221;.  The rules didn&#8217;t explicitly say I could use pure SVG, they mention SVG/Canvas in the context of HTML5 only, but I thought I&#8217;d give it a shot.  It&#8217;s in the spirit of the contest, after all.  At the very least it would encourage Microsoft to clarify the rules and at the very best it would be accepted and the rules updated to allow pure SVG applications.  Looks like it was my lucky day.<span id="more-551"></span></p>
<p>I decided to go with my <a href="http://codedread.com/solitaire.php">Solitaire</a> demo because it was the most complete, didn&#8217;t infringe on any copyrights (looking at you Tetris), and most visually recognizable.  It&#8217;s not the most innovative, but then again the point of this is not necessarily to win any prizes.  It&#8217;s really about increasing awareness.</p>
<p>Unfortunately, the SVG (26kb) and JavaScript (16kb + 21kb) totaled 63kb.  I did some cleanup of the SVG, minified the JS and then put the script inline with the SVG and then gzipped it.  The result was a .svgz file that was 9kb.  Perfect!</p>
<p>I then got an email from a friendly marketing/evangelism person at Microsoft who said that the engineers did not know how to open the svgz file to review the code to ensure it was under 10k.  Woops!  I explained to her that I thought it would be ok for the SVG to be gzipped, much as PNG/GIF files use compression and sent her the uncompressed SVG file for them to review.  After all, SVG is just an image format, right? <img src='http://www.codedread.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Was I following the rules?  Did Microsoft give me a fair shake?  <a href="http://mix10k.visitmix.com/Entry/Details/160">See for yourself</a>.  Who knows, maybe this is the first time a Microsoft admin had to figure out how to serve SVG on a Microsoft web server.</p>
<p>Out of curiosity, I later tried to see how far I was able to get down the Solitaire game: <a href="http://codedread.com/solitaire.svgz">5811 bytes</a>.  Not bad for a complete game that has scalable graphics.  I&#8217;d be curios to see the equivalent SWF file.</p>
<p>I don&#8217;t expect you to vote for my entry, but what I do expect you to do is now go out and submit .SVGZ entries to the MIX 10k challenge.  That one SVG entry is looking pretty lonely.  If I can get Solitaire down to 5811 bytes, surely you can do better?</p>
<p>Thanks a lot to Amy, the evangelist/marketing person who really was quite patient with me.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2010/01/14/mix-10k-code-challenge-svg/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Just Ship It!</title>
		<link>http://www.codedread.com/blog/archives/2010/01/11/just-ship-it/</link>
		<comments>http://www.codedread.com/blog/archives/2010/01/11/just-ship-it/#comments</comments>
		<pubDate>Mon, 11 Jan 2010 20:31:29 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[RIA]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[comics]]></category>
		<category><![CDATA[svg-edit]]></category>

		<guid isPermaLink="false">http://blog.codedread.com/archives/2010/01/11/just-ship-it/</guid>
		<description><![CDATA[[clipart]So Alexis and wormsxulla and all the translators and anyone who opened a bug against SVG-edit should really just be proud, because SVG-edit 2.4, codenamed Arbelos, is now released. Try out the DEMO now. For those who have more time to kill, here are a couple screencasts I tried to make that demonstrate the new [...]]]></description>
			<content:encoded><![CDATA[<p><object type="image/svg+xml" width="100" height="100" style="float:right" data="http://codedread.com/clipart/svgedit.svgz">[clipart]</object>So <a href="http://a.deveria.com/">Alexis</a> and <a href="http://vertex.corpsmoderne.net/main.php?g2_itemId=114">wormsxulla</a> and all the translators and anyone who opened a bug against <a href="http://svg-edit.googlecode.com/">SVG-edit</a> should really just be proud, because SVG-edit 2.4, codenamed Arbelos, is now released.  Try out the <a href="http://svg-edit.googlecode.com/svn/branches/2.4/editor/svg-editor.html">DEMO</a> now.<span id="more-550"></span></p>
<p>For those who have more time to kill, here are a couple screencasts I tried to make that demonstrate the new features:</p>
<p><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/zpC7b1ZJvvM&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/zpC7b1ZJvvM&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object><object width="425" height="344"><param name="movie" value="http://www.youtube.com/v/mDzZEoGUDe8&#038;hl=en_US&#038;fs=1&#038;"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/mDzZEoGUDe8&#038;hl=en_US&#038;fs=1&#038;" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="344"></embed></object></p>
<p>And there&#8217;s <a href="http://code.google.com/p/svg-edit/issues/list?can=2&#038;q=label%3ANeededFor-2.5">lots more</a> coming in SVG-edit 2.5 (codenamed Bicorn) that we&#8217;ll be talking about in the future.</p>
<p>To celebrate, here&#8217;s another comic I made using SVG-edit (<a href="http://www.codedread.com/comics/003.svgz">view full size</a>):</p>
<p><object type="image/svg+xml" data="http://www.codedread.com/comics/003.svgz" width="600" height="900"/></p>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2010/01/11/just-ship-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Smile Zen Garden?</title>
		<link>http://www.codedread.com/blog/archives/2008/05/19/smile-zen-garden/</link>
		<comments>http://www.codedread.com/blog/archives/2008/05/19/smile-zen-garden/#comments</comments>
		<pubDate>Tue, 20 May 2008 02:49:48 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[fakesmile]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flickr]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[smil]]></category>

		<guid isPermaLink="false">http://blog.codedread.com/archives/2008/05/19/smile-zen-garden/</guid>
		<description><![CDATA[I&#8217;ve been watching David&#8217;s FakeSmile script evolve over the course of the last few months. At the same time, I have been reading up on SMIL Timesheets, a recent specification drafted by the SYMM Working Group. With recent support of timesheets in FakeSmile, I thought it would be a good chance to experiment. Flickr Badges [...]]]></description>
			<content:encoded><![CDATA[<p><object type="image/svg+xml" width="100" height="100" align="right" hspace="10" data="http://codedread.com/clipart/smile.svgz"><span/></object>I&#8217;ve been watching David&#8217;s <a href="http://leunen.d.free.fr/fakesmile/" title="Animate Graphics and Text in Web Pages">FakeSmile</a> script evolve over the course of the last few months.  At the same time, I have been reading up on <a href="http://www.w3.org/TR/timesheets/" title="SMIL Timesheets">SMIL Timesheets</a>, a recent specification drafted by the <a href="http://www.w3.org/AudioVideo/">SYMM Working Group</a>.  With recent support of timesheets in FakeSmile, I thought it would be a good chance to experiment.  <span id="more-462"></span></p>
<h3 id="flickr-badges">Flickr Badges</h3>
<p><a href="http://www.flickr.com/">Flickr</a> is a pretty popular site for sharing photos with friends, family and the world.  Flickr even lets you embed &#8216;badges&#8217; of your recent or popular photos into your own web page using HTML or Flash.  Of course the Flash badge has some animation effects that are not easily achievable in HTML.  I thought I&#8217;d use FakeSmile + SVG to create my own badge.  I started with some backend code that <a href="http://www.latenightpc.com/blog/" title="Rob Russell's blog">Rob</a> has had kicking around in his repository for almost two years.</p>
<p><object align="right" type="image/svg+xml" width="75" height="150" hspace="20" data="http://www.codedread.com/flickr/badge.php"><span/></object>You can see the results to the right and also on my <a href="http://www.codedread.com/about.php" title="Jeff Schiller">personal info</a> page.  The badge has been tested in <a href="http://www.mozilla.com/firefox" title="Firefox web browser">Firefox</a>, <a href="http://www.opera.com/" title="Opera Web Browser">Opera</a> or <a href="http://www.apple.com/safari" title="Safari Web Browser for MacOSX and Windows">Safari</a>.  There seems to be some trouble with the <a href="http://www.examotion.com/index.php?id=product_player_download" title="SVG Plugin for Internet Explorer">Renesis 1.1 plugin</a> for Internet Explorer, so please stay tuned there.  The badge can be seen full-browser <a href="http://www.codedread.com/flickr/badge.php">here</a> (sorry for the low-quality rasters, I&#8217;m only grabbing 75&#215;75 pixel thumbnails from Flickr at the moment).</p>
<p>The images are cached from Flickr using a bit of <a href="http://php.net/">PHP</a> and the Flickr feed is checked every hour for new photos.  If you want to see the source of the PHP, please <a href="http://www.codedread.com/flickr/badge.php?view_source=1">click here</a>.</p>
<h3 id="smil-timesheets">SMIL Timesheets</h3>
<p><a href="http://my.opera.com/MacDev_ed/blog/2008/05/18/timetravel" title="Erik Dahlström's Opera blog">Others</a> have started experimenting with FakeSmile, too.  Usually the people that I talk to that have used <abbr title="Synchronized Multimedia Integration Language">SMIL</abbr> are pretty delighted with the technology.  It&#8217;s a shame that it&#8217;s not well-supported across modern browsers yet &#8211; perhaps it has something to do with the <a href="http://lists.w3.org/Archives/Public/www-smil/2008AprJun/">slow public response rate</a> of the SYMM Working Group? <img src='http://www.codedread.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>However, while Opera (and now <a href="http://webkit.org/">WebKit</a>) have started to support SMIL within <a href="http://www.w3.org/Graphics/SVG" title="Scalable Vector Graphics">SVG</a>, there are no browsers that support SMIL Timesheets yet.  So FakeSmile will have to do for now (<a href="http://www.tml.tkk.fi/~pv/timesheets/instructions.xhtml">here&#8217;s</a> another alternative that I have not experimented with).</p>
<p>You can think of SMIL Timesheets as the counterpart to <a href="http://www.w3.org/Style/CSS/" title="Cascading StyleSheets">CSS</a> for web pages.  If <a href="http://www.csszengarden.com/" title="CSS Zen Garden">stylesheets</a> are like the <em>set decoration</em> of your web page, then timesheets are like the <em>choreography</em>.  What&#8217;s really nice about this is that you can have a nice, concise bit of markup representing your content (the images, in this case) and then you can externally link to a separate timesheet to animate the web page.  You can use CSS selectors to apply animations to any of your web elements and use the same timesheet across multiple pages.  You can see my SMIL Timesheet <a href="http://www.codedread.com/flickr/flash.smil.txt">here</a>.</p>
<p>If anyone wants to send me a SMIL timesheet with other cool effects, please feel free (look for my email address <a href="http://www.codedread.com/about.php">here</a>).  Perhaps I&#8217;ll eventually have my PHP pick a random effect one day.</p>
<h3 id="fakesmile">FakeSmile</h3>
<p>The <a href="http://leunen.d.free.fr/fakesmile/">FakeSmile</a> script has come a long way since David released it a few months ago.  It implements a decent amount of SMIL and SMIL Timesheets so that you can actually use these technologies now while the browser vendors catch up.  David has also recently included a full version of <a href="http://jquery.com/">jQuery</a> inside the FakeSmile script, so it&#8217;s beefed up with lots of power now.  I think he will probably be releasing minimized/compressed versions eventually.</p>
<p><i>[Update:  I should also acknowledge <a href="http://www.alleged.org.uk/pdc/2006/01/01.html">Damian Cugley</a> for being the original inspiration behind Rob starting his project]</i></p>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2008/05/19/smile-zen-garden/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fake Smile</title>
		<link>http://www.codedread.com/blog/archives/2008/03/16/fake-smile/</link>
		<comments>http://www.codedread.com/blog/archives/2008/03/16/fake-smile/#comments</comments>
		<pubDate>Mon, 17 Mar 2008 04:10:43 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[RIA]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[smil]]></category>

		<guid isPermaLink="false">http://blog.codedread.com/archives/2008/03/16/fake-smile/</guid>
		<description><![CDATA[David Leunen has released a new JavaScript library to fake SMIL for modern browsers that do not yet support declarative animation (Firefox 3.0- and Safari 3.0-). The nice thing about this is that it uses existing standards, so that when Mozilla and WebKit finally implement SMIL, this script will avoid executing. On that day, suddenly [...]]]></description>
			<content:encoded><![CDATA[<p><object type="image/svg+xml" width="100" height="100" align="right" hspace="10" data="http://codedread.com/clipart/smile.svgz"><span/></object><a href="http://fakesmil.blogspot.com/">David Leunen</a> has released a new <a href="http://leunen.d.free.fr/fakesmile/" title="FakeSmile">JavaScript library</a> to fake <a href="http://www.w3.org/AudioVideo/" title="Synchronized Multimedia Integration Language">SMIL</a> for modern browsers that do not yet support declarative animation (Firefox 3.0- and Safari 3.0-).  The nice thing about this is that it uses existing standards, so that when Mozilla and WebKit finally implement SMIL, this script will avoid executing.  On that day, suddenly animations will become less processor-intensive.  I&#8217;m all about <a href="http://en.wikipedia.org/wiki/Progressive_enhancement">progressive enhancement</a>, but I&#8217;m also not above occasionally faking it a little to experiment with cool features.  <span id="more-440"></span></p>
<p>As with all experiments of late, you need a cool browser like <a href="http://www.opera.com/">Opera</a>, <a href="http://www.mozilla.org/firefox/">Firefox</a> or <a href="http://www.apple.com/safari">Safari</a> to see this stuff.  I&#8217;d be interested to hear if Konqueror 4.0 supports it.  Internet Explorer will just not do, I&#8217;m afraid.</p>
<p id="where-i-use-smil">I currently use SMIL in <a href="http://www.codedread.com/menu.svg">my menu</a> above, in the leering FakeSmile icon to the right <strike>(which I&#8217;ve inlined to see what happens when it gets aggregated in feed readers like <a href="http://intertwingly.net/code/venus/">Planet Venus</a>)</strike>, and now in my comment box when you focus and blur it.</p>
<p>Yes, this is just <abbr title="shits and giggles">shiggles</abbr> and not very productive &#8211; but I&#8217;m <a href="http://realtech.burningbird.net/design/having-ones-cake/">not alone</a> in experimenting with some advanced web features on my blog.</p>
<p>Yes, SMIL intermixes &#8220;presentational&#8221;-type markup with &#8220;content&#8221; markup &#8211; but <a href="http://www.w3.org/TR/2008/WD-timesheets-20080110/">SMIL Timesheets</a> looks to me like an attempt by the SYMM Working Group to address this.  Maybe something in the future for FakeSmile to support?</p>
<p>And yes, it&#8217;s kinda fun.  SMIL is the blink tag of the new millenium&#8230;</p>
<p>Oh, and in case you <a href="#where-i-use-smil">missed it</a> above, I&#8217;ve started using SMIL in my blog&#8217;s <a href="http://blog.codedread.com/?p=440&#038;preview=true#comment">comment</a> textarea &#8211; that&#8217;s XHTML, not SVG.  The FakeSmile library supports a limited subset of SMIL functionality in not just SVG content but on any attribute in a XML-based language (provided you properly namespace where required, like in XHTML):</p>
<div class="code">&#60;textarea rows=&#8221;5&#8243; &#8230;&#62;<br/><b>&#160;&#160;&#60;smil:animate attributeName=&#8221;rows&#8221; from=&#8221;5&#8243; to=&#8221;10&#8243; dur=&#8221;350ms&#8221; begin=&#8221;focus&#8221; end=&#8221;blur&#8221; fill=&#8221;freeze&#8221; /&#62;</b><br/>&#60;/textarea&#62;</div>
<p>That&#8217;s what makes XHTML so attractive to me &#8211; the X is for eXtensibility.  While I still support the effort, the <a href="http://esw.w3.org/topic/HTML/SVGInTextHTML">current HTML 5 activity</a> is mostly focused on SVG (and to a lesser extent MathML) integration with text/html.  I hope they do address more <a href="http://www.intertwingly.net/blog/2007/08/02/HTML5-and-Distributed-Extensibility">flexible extensibility</a> within HTML5 at a later date.  It would be great if someone had already done <a href="http://www.w3.org/TR/NOTE-HTMLplusTIME">HTML+SMIL</a> so there was some basis off which to work.  Snarkiness aside, I will admit to not understanding the ins-and-outs of namespaces within HTML and all the problems it poses, but I&#8217;m trying to learn in my spare time&#8230;</p>
<p>One semi-amusing footnote:  You won&#8217;t see the textarea expand when you focus it in Opera.  This is because Opera supports SMIL-in-SVG already, so the FakeSmile script is not executed (short-circuited).  It would be great if Opera went ahead with <a href="http://www.w3.org/TR/XHTMLplusSMIL/">XHTML+SMIL</a> support.  I&#8217;m not sure why that hasn&#8217;t happened yet&#8230;</p>
<p><i>[Update: David has fixed his library to allow Opera to use the library for XHTML+SMIL as well as interpolate between properties with units (i.e. 2em).]</i></p>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2008/03/16/fake-smile/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>A Video Of Opera 9.5 Preview</title>
		<link>http://www.codedread.com/blog/archives/2007/09/04/a-video-of-opera-95-preview/</link>
		<comments>http://www.codedread.com/blog/archives/2007/09/04/a-video-of-opera-95-preview/#comments</comments>
		<pubDate>Tue, 04 Sep 2007 20:57:49 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Opera]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://blog.codedread.com/archives/2007/09/04/a-video-of-opera-95-preview/</guid>
		<description><![CDATA[I&#8217;m pretty happy with the performance of the Opera 9.5 Alpha 1 preview (Codename &#8220;Kestrel&#8221; &#8211; download here). So happy that I decided to finally try and figure out how to make a screencast today. Below is the results of pointing Opera 9.5 Alpha 1 at my Web Statistics page that I made a year [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m pretty happy with the performance of the <a href="http://www.opera.com/">Opera</a> 9.5 Alpha 1 preview (Codename &#8220;Kestrel&#8221; &#8211; <a href="http://my.opera.com/desktopteam/blog/2007/09/04/go-and-get-opera-9-5-alpha-3">download here</a>).  So happy that I decided to finally try and figure out how to make a screencast today.  <span id="more-392"></span></p>
<div class="ads"><object type="text/html" width="468" height="60" data="http://www.codedread.com/gads.php"></object></div>
<p>Below is the results of pointing Opera 9.5 Alpha 1 at my <a href="http://www.codedread.com/displayWebStats.php">Web Statistics</a> page that I made a year and a half ago with <a href="http://www.w3.org/TR/Graphics/SVG" title="Scalable Vector Graphics">SVG</a> and JavaScript.  The SVG features several layered path elements of more than 650 data points each with slidable and sizable scrollbars.  The performance of Opera 9.5 is about the best there is.  If you can put up with the crappy resolution of YouTube, here&#8217;s an example of me playing around:</p>
<p><object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/oZRUAkk5VCQ"></param> <embed src="http://www.youtube.com/v/oZRUAkk5VCQ" type="application/x-shockwave-flash" width="425" height="350"></embed></object></p>
<p>Of course, I&#8217;m pretty happy with Opera 9.5&#8242;s improved <a href="http://www.codedread.com/svg-support.php">SVG support</a> &#8211; it now surpasses all other SVG viewers out there in terms of SVG Test Suite pass/fail scores.  There are some more interesting SVG features included (SVG as CSS background-image, SVGT 1.2 features) that I&#8217;ll likely be playing with in the next little while.</p>
<p>Note that this is still an <em>Alpha</em> build and such, should be treated as such.  While the rendering and scrolling of pages seems really snappy, I&#8217;ve noticed when running through the SVG test suite that occasionally pages would &#8220;stick&#8221; (can&#8217;t think of another word for it &#8211; they wouldn&#8217;t finish loading).  Sometimes the loading would eventually finish (a PNG or SVG object would finally load) after some time, but other times I would have to force a reload of the page a couple of times to get it.  It&#8217;s one of those wrinkles I expect will get ironed out before final release.</p>
<p>And yay, finally ALT-D will focus the Location Bar in all four browsers (IE, Firefox, Safari and now Opera).  Guess those guys do listen! <img src='http://www.codedread.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<div class="ads"><object type="text/html" width="468" height="60" data="http://www.codedread.com/gads.php"></object></div>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2007/09/04/a-video-of-opera-95-preview/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sam Ruby: Inline SVG in IE</title>
		<link>http://www.codedread.com/blog/archives/2007/05/04/sam-ruby-inline-svg-in-ie/</link>
		<comments>http://www.codedread.com/blog/archives/2007/05/04/sam-ruby-inline-svg-in-ie/#comments</comments>
		<pubDate>Sat, 05 May 2007 01:59:59 +0000</pubDate>
		<dc:creator>Jeff</dc:creator>
				<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[QuickLinks]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[SVG]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://blog.codedread.com/archives/2007/05/04/sam-ruby-inline-svg-in-ie/</guid>
		<description><![CDATA[Thanks, Sam for kicking this off &#8211; I knew it was just a matter of time before someone would do a proof-of-concept, but the week of MIX07 was earlier than I expected! One suggestion: If you&#8217;re going to use simple IE detection, then why not use IE conditional comments rather than forcing other SVG-capable browsers [...]]]></description>
			<content:encoded><![CDATA[<p>Thanks, <a href="http://www.intertwingly.net/blog/2007/05/04/Inline-SVG-in-MSIE">Sam</a> for kicking this off &#8211; I knew it was just a matter of time before someone would do a proof-of-concept, but the week of MIX07 was earlier than I expected! <img src='http://www.codedread.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>One suggestion:  If you&#8217;re going to use simple IE detection, then why not use <a href="http://blog.codedread.com/archives/2007/04/17/how-to-use-ie-conditional-comments-in-xhtml/">IE conditional comments</a> rather than forcing other SVG-capable browsers to load and parse and run the JavaScript?  Something like:</p>
<div class="code">
<pre>
&#60;!--[if IE]>
  &#60;script type="text/javascript" src="SVG2SL.js">&#60;/script>
&#60;![endif]-->
</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.codedread.com/blog/archives/2007/05/04/sam-ruby-inline-svg-in-ie/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

