<?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>Delivering Quality</title>
	<atom:link href="http://www.markdeepwell.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.markdeepwell.com</link>
	<description>A Software Developers View of the World</description>
	<lastBuildDate>Thu, 29 Jul 2010 16:44:04 +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>mod_mono.so library OS X</title>
		<link>http://www.markdeepwell.com/2010/07/mod_mono-so-library-os-x/</link>
		<comments>http://www.markdeepwell.com/2010/07/mod_mono-so-library-os-x/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 16:44:04 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Mac]]></category>
		<category><![CDATA[compiled library]]></category>
		<category><![CDATA[OS X]]></category>

		<guid isPermaLink="false">http://www.markdeepwell.com/?p=526</guid>
		<description><![CDATA[Here are compiled versions of the mod_mono.so libraries built for OS X Snow Leopard as a convenience in case you don&#8217;t want to bother compiling them. mod_mono version: 2.6.3 Download 32-bit: i386 64-bit: x86_64]]></description>
			<content:encoded><![CDATA[<p>Here are compiled versions of the <a href="http://en.wikipedia.org/wiki/Mod_mono">mod_mono</a>.so libraries built for OS X Snow Leopard as a convenience in case you don&#8217;t want to bother compiling them.</p>
<p>mod_mono version: 2.6.3</p>
<h3>Download</h3>
<p>32-bit: <a href="http://www.markdeepwell.com/wp-content/uploads/2010/07/mod_mono-i386.zip"> i386</a><br />
64-bit: <a href="http://www.markdeepwell.com/wp-content/uploads/2010/07/mod_mono-x86_64.zip"> x86_64</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.markdeepwell.com/2010/07/mod_mono-so-library-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby Subversion Bindings</title>
		<link>http://www.markdeepwell.com/2010/06/ruby-subversion-bindings/</link>
		<comments>http://www.markdeepwell.com/2010/06/ruby-subversion-bindings/#comments</comments>
		<pubDate>Sun, 27 Jun 2010 05:30:01 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Basics]]></category>
		<category><![CDATA[Software Bindings]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby Subversion Bindings]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[SVN]]></category>

		<guid isPermaLink="false">http://www.markdeepwell.com/?p=516</guid>
		<description><![CDATA[Subversion has bindings for a variety of languages: Java, Perl, Python and Ruby. Of these I am most interested in the Ruby bindings as I'm building a Rails application. Unfortunately the documentation is completely lacking and bits of it are scattered throughout the web. This is an attempt to provide the code and how-to for [...]]]></description>
			<content:encoded><![CDATA[<p>Subversion has bindings for a variety of languages: Java, Perl, Python and Ruby. Of these I am most interested in the Ruby bindings as I'm building a Rails application. Unfortunately the documentation is completely lacking and bits of it are scattered throughout the web. This is an attempt to provide the code and how-to for the most common tasks.</p>
<p>Before we get to the code, validate you have the Ruby Subversion bindings installed correctly by running irb from a terminal:</p>
<p>irb(main):001:0&gt; require 'svn/client'<br />
=&gt; true</p>
<p>Onto the source code. Start it off by including the required svn modules:</p>
<div class="igBar"><span id="lruby-7"><a href="#" onclick="javascript:showPlainTxt('ruby-7'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">RUBY:</span>
<div id="ruby-7">
<div class="ruby">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">"svn/core"</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">"svn/client"</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">"svn/wc"</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">"svn/repos"</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Then setup the context with your subversion credentials:</p>
<div class="igBar"><span id="lruby-8"><a href="#" onclick="javascript:showPlainTxt('ruby-8'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">RUBY:</span>
<div id="ruby-8">
<div class="ruby">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">ctx = Svn::Client::Context.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">ctx.<span style="color:#9900CC;">add_simple_provider</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">ctx.<span style="color:#9900CC;">auth_baton</span><span style="color:#006600; font-weight:bold;">&#91;</span>Svn::Core::AUTH_PARAM_DEFAULT_USERNAME<span style="color:#006600; font-weight:bold;">&#93;</span> = 'username'</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">ctx.<span style="color:#9900CC;">auth_baton</span><span style="color:#006600; font-weight:bold;">&#91;</span>Svn::Core::AUTH_PARAM_DEFAULT_PASSWORD<span style="color:#006600; font-weight:bold;">&#93;</span> = 'password' </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Now you can run any of the following commands on a remote subversion repository.</p>
<h3>SVN Info</h3>
<div class="igBar"><span id="lruby-9"><a href="#" onclick="javascript:showPlainTxt('ruby-9'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">RUBY:</span>
<div id="ruby-9">
<div class="ruby">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">repos_uri = 'http://svn.<span style="color:#9900CC;">website</span>.<span style="color:#9900CC;">com</span>/project/trunk'</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">revision = <span style="color:#006666;color:#800000;">50</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#9966CC; font-weight:bold;">begin</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; ctx.<span style="color:#9900CC;">info</span><span style="color:#006600; font-weight:bold;">&#40;</span>repos_uri, revision<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span> |path, info|</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#CC0066; font-weight:bold;">puts</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">"Url: #{info.url}"</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#CC0066; font-weight:bold;">puts</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">"Last changed rev: #{info.last_changed_rev}"</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#CC0066; font-weight:bold;">puts</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">"Last changed author: #{info.last_changed_author}"</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#CC0066; font-weight:bold;">puts</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">"Last changed date: #{info.last_changed_date}"</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#CC0066; font-weight:bold;">puts</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">"Kind: #{info.kind}"</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#9966CC; font-weight:bold;">end</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#9966CC; font-weight:bold;">rescue</span> Svn::Error =&gt; e</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#008000; font-style:italic;"># catch a generic svn error</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#CC0066; font-weight:bold;">raise</span> <span style="color:#996600;">"Failed to retrieve SVN info at revision "</span> + revision.<span style="color:#9900CC;">to_s</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#9966CC; font-weight:bold;">end</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<h3>SVN Checkout</h3>
<div class="igBar"><span id="lruby-10"><a href="#" onclick="javascript:showPlainTxt('ruby-10'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">RUBY:</span>
<div id="ruby-10">
<div class="ruby">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">repos_uri = 'http://svn.<span style="color:#9900CC;">website</span>.<span style="color:#9900CC;">com</span>/project/trunk'</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">output_dir '/home/billy/project_name'</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">revision = <span style="color:#006666;color:#800000;">50</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#9966CC; font-weight:bold;">begin</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; ctx.<span style="color:#9900CC;">checkout</span><span style="color:#006600; font-weight:bold;">&#40;</span>repos_uri, output_dir, revision.<span style="color:#9900CC;">to_i</span>, <span style="color:#0000FF; font-weight:bold;">nil</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#9966CC; font-weight:bold;">rescue</span> Svn::Error::CLIENT_UNRELATED_RESOURCES =&gt; e <span style="color:#008000; font-style:italic;"># revision doesn't exist</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#CC0066; font-weight:bold;">raise</span> <span style="color:#996600;">"No such revision "</span> + revision.<span style="color:#9900CC;">to_s</span> + <span style="color:#996600;">" at "</span> + repos_uri</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#9966CC; font-weight:bold;">end</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<h3>SVN Log</h3>
<div class="igBar"><span id="lruby-11"><a href="#" onclick="javascript:showPlainTxt('ruby-11'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">RUBY:</span>
<div id="ruby-11">
<div class="ruby">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">repos_uri = 'http://svn.<span style="color:#9900CC;">website</span>.<span style="color:#9900CC;">com</span>/project/trunk'</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">ctx.<span style="color:#9900CC;">log</span><span style="color:#006600; font-weight:bold;">&#40;</span>repos_uri, <span style="color:#006666;color:#800000;">0</span>, 'HEAD', <span style="color:#006666;color:#800000;">0</span>, <span style="color:#0000FF; font-weight:bold;">true</span>, <span style="color:#0000FF; font-weight:bold;">nil</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span> |changed_paths, rev, author, date, message|</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#CC0066; font-weight:bold;">puts</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">"Revision: #{rev}"</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#CC0066; font-weight:bold;">puts</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">"Author: #{author}"</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#CC0066; font-weight:bold;">puts</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">"Date: #{date}"</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#CC0066; font-weight:bold;">puts</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">"Message: #{message}"</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#CC0066; font-weight:bold;">puts</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">"---------------------------"</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#9966CC; font-weight:bold;">end</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<h3>SVN List</h3>
<div class="igBar"><span id="lruby-12"><a href="#" onclick="javascript:showPlainTxt('ruby-12'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">RUBY:</span>
<div id="ruby-12">
<div class="ruby">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">repos_uri = 'http://svn.<span style="color:#9900CC;">website</span>.<span style="color:#9900CC;">com</span>/project/trunk'</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">ctx.<span style="color:#9900CC;">list</span><span style="color:#006600; font-weight:bold;">&#40;</span>repos_uri, <span style="color:#996600;">"HEAD"</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#9966CC; font-weight:bold;">do</span> |path, dirent, lock, abs_path|</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#9966CC; font-weight:bold;">if</span> !path.<span style="color:#9900CC;">blank</span>?</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#CC0066; font-weight:bold;">puts</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">"Path: #{path}"</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#9966CC; font-weight:bold;">end</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#9966CC; font-weight:bold;">end</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>That should get you started with the ruby bindings. If you want to know how to do anything else let me know in the comments.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markdeepwell.com/2010/06/ruby-subversion-bindings/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Debugging Form Errors in symfony 1.3+</title>
		<link>http://www.markdeepwell.com/2010/04/debugging-form-errors-in-symfony-1-3/</link>
		<comments>http://www.markdeepwell.com/2010/04/debugging-form-errors-in-symfony-1-3/#comments</comments>
		<pubDate>Thu, 15 Apr 2010 16:19:13 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[debug]]></category>
		<category><![CDATA[form validation]]></category>
		<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://www.markdeepwell.com/?p=503</guid>
		<description><![CDATA[Symfony 1.3 (or symfony 1.4) provides an incredibly helpful feature to help debug forms. This new feature is included in the developer toolbar and shows valuable information about the forms on the page. To access the detailed form information, click on the view button, click on the template or partial that the form is in, [...]]]></description>
			<content:encoded><![CDATA[<p>Symfony 1.3 (or symfony 1.4) provides an incredibly helpful feature to help  debug forms. This new feature is included in the developer toolbar and shows valuable information about the forms on the page. To access the detailed form information, click on the <em>view</em> button, click on the template or partial that the form is in, and then click to expand the form. It lists each form widget and if any errors for a given widget exist they are shown   right under it. Errors are also highlighted to make them easy to   spot.</p>
<p><a href="http://www.markdeepwell.com/wp-content/uploads/2010/04/form-widget-view.jpg"><img class="aligncenter size-full  wp-image-508" title="form widget view" src="http://www.markdeepwell.com/wp-content/uploads/2010/04/form-widget-view.jpg" alt="" width="435" height="202" /></a></p>
<p>The symfony debug toolbar will look like this when there is a validation error in one of the forms on the current page. This is one of the most incredibly useful features I've seen and greatly  improves productivity while building forms in the symfony framework. Congratulations to the symfony developers who came up with this tool!</p>
<p><a href="http://www.markdeepwell.com/wp-content/uploads/2010/04/symfony-debug-toolbar-1.4.jpg"><img class="aligncenter size-full  wp-image-509" title="symfony debug toolbar 1.4" src="http://www.markdeepwell.com/wp-content/uploads/2010/04/symfony-debug-toolbar-1.4.jpg" alt="" width="492" height="21" /></a></p>
<p>Have symfony 1.1 or 1.2? read <a href="http://www.markdeepwell.com/2009/07/catch-symfony-form-errors/">catch symfony form errors</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markdeepwell.com/2010/04/debugging-form-errors-in-symfony-1-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What Will Web Development Look Like in 5 Years</title>
		<link>http://www.markdeepwell.com/2010/03/what-will-web-development-look-like-in-5-years/</link>
		<comments>http://www.markdeepwell.com/2010/03/what-will-web-development-look-like-in-5-years/#comments</comments>
		<pubDate>Wed, 24 Mar 2010 16:40:45 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Mobile]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Software Tools]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[5 Years]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[Canvas]]></category>
		<category><![CDATA[Framework]]></category>
		<category><![CDATA[Future]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[WebGL]]></category>

		<guid isPermaLink="false">http://www.markdeepwell.com/?p=438</guid>
		<description><![CDATA[Developing applications for the web has changed significantly over the last 5 years. Since 2005 the term AJAX has been coined, Ruby on Rails is now an open source web application framework, jQuery was created and has subsequently revolutionized JavaScript development, and now HTML5 is the top buzzword of the day. I believe the next [...]]]></description>
			<content:encoded><![CDATA[<p>Developing applications for the web has changed significantly over the last 5 years. Since 2005 the term AJAX has been coined, Ruby on Rails is now an open source web application framework, jQuery was created and has subsequently revolutionized JavaScript development, and now HTML5 is the top buzzword of the day. I believe the next 5 years will hold just as many improvements for web developers.</p>
<p>I foresee a new framework will be created to make developing fully interactive AJAX applications  as easy as it is to write current MVC applications. Current  frameworks like Ruby on Rails and Symfony provide everything you need to develop a modern application without having to build plumbing infrastructure; however, they do not provide nice components for interactive applications. In addition to a robust server core, this new framework will have   a client side JavaScript component that simplifies the process of building interactive web 2.0 applications. Some critical components would be:</p>
<ul>
<li>Form Validation. Libraries do exist to validate forms in JavaScript,  but they don't integrate with the server side form validation. In this new framework you won't have to write form validation code twice.</li>
<li>Paginated Lists. Almost all web applications have at least one page where data needs to be searched and listed with pagination. We need to have this same functionality in JavaScript to skip a full page reload and provide local caching of the results.</li>
<li>Animation Library. While script.aculo.us and jQuery have made simple animations and visual effects much easier to do, I believe we can go even farther. Web applications also need to gain that fluidity and soft animations that desktop applications such as Exposé have had for a couple of years.</li>
</ul>
<p>I also see huge resources being directed towards mobile development because ALL current generation smart phones are built for an incredible web browsing experience. As home users have switched from <a href="http://www.canada.com/technology/tech-biz/laptops+dominate+desktop+face+obsolescence/1151512/story.html">desktop computers</a> to <a href="http://www.google.com/trends?q=laptop%2C+desktop">laptop computers</a> in the last few years, people will slowly start switching to hand-held devices for their primary communication and Internet needs. Most likely this will have one primary effect: web frameworks will have a mobile optimized version of the site done automatically. Little to none developer intervention will be required as only resolution, text sizes, and layouts will be modified for the mobile version.</p>
<p>Lastly I see tools and libraries around 2D and 3D drawing elements. Most likely these libraries would be rendering to a <a href="https://developer.mozilla.org/en/Canvas_tutorial">Canvas</a> or a <a href="http://planet-webgl.org/">WebGL</a> element but something better could be created. Both of these are young standards right now that show a lot of promise on delivering the ability to draw pixels directly in a native HTML web page. While they will be used first in simple computer games, I am very interested to see what libraries are created to facilitate these elements being used appropriately inside next generation web applications.</p>
<p>What do you think the next 5 years will bring?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markdeepwell.com/2010/03/what-will-web-development-look-like-in-5-years/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bash Basics</title>
		<link>http://www.markdeepwell.com/2010/03/bash-basics/</link>
		<comments>http://www.markdeepwell.com/2010/03/bash-basics/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 20:47:33 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Basics]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Shell Scripting]]></category>

		<guid isPermaLink="false">http://www.markdeepwell.com/?p=490</guid>
		<description><![CDATA[Bash is a shell scripting language included on most Linux and Mac computers. It's useful for writing small scripts that don't require another software language to be installed and are immediately portable. Good places to use bash scripts are when you want to write a cronjob, backup some files, or run an update task. Here [...]]]></description>
			<content:encoded><![CDATA[<p>Bash is a shell scripting language included on most Linux and Mac computers. It's useful for writing small scripts that don't require another software language to be installed and are immediately portable. Good places to use bash scripts are when you want to write a cronjob, backup some files, or run an update task. Here are the basics to get you started.</p>
<p>Start your script with She-Bang header:<br />
<code>#!/bin/bash</code></p>
<p>Variables are assigned by a key-value pairing:<br />
<code>FILENAME="~/docs/input"</code></p>
<p>You can print to the console by using echo:<br />
<code>echo $FILENAME</code></p>
<p>An IF statement:<br />
<code>if [ ! -s $FILENAME ] ; then<br />
&nbsp;&nbsp;touch $FILENAME<br />
fi</code><br />
The bang ! negates the result, and the -s parameter checks if a file exists.</p>
<p>Example of a function:<br />
<code>function getFile<br />
{<br />
&nbsp;&nbsp;# function contents here<br />
&nbsp;&nbsp;# the hash symbol makes the rest of this line a comment<br />
}</code></p>
<p>Call this function by using its name:<br />
<code>getFile</code></p>
<p>You can pass a variable to a function:<br />
<code>getFile "/home/user/docs/file.txt"</code></p>
<p>And use it within the function by reference to $1<br />
<code>function getFile<br />
{<br />
&nbsp;&nbsp;echo $1<br />
}</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.markdeepwell.com/2010/03/bash-basics/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HTTP Header to Force Browser Download</title>
		<link>http://www.markdeepwell.com/2010/03/http-header-to-force-browser-download/</link>
		<comments>http://www.markdeepwell.com/2010/03/http-header-to-force-browser-download/#comments</comments>
		<pubDate>Mon, 08 Mar 2010 15:12:45 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[HTTP Headers]]></category>

		<guid isPermaLink="false">http://www.markdeepwell.com/?p=485</guid>
		<description><![CDATA[A content disposition header can be used to tell web browsers to ask the user where they want to save the file (and download it) instead of actually opening the file in a browser tab/window. Very handy if you want to have a download button. Content-Disposition: attachment; filename="filename.mp3" Tested in: Firefox, Safari, IE, Opera, and [...]]]></description>
			<content:encoded><![CDATA[<p>A content disposition header can be used to tell web browsers to ask the user where they want to save the file (and download it) instead of actually opening the file in a browser tab/window. Very handy if you want to have a <strong>download</strong> button.</p>
<p><code>Content-Disposition: attachment; filename="filename.mp3"</code></p>
<p>Tested in: Firefox, Safari, IE, Opera, and Google Chrome</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markdeepwell.com/2010/03/http-header-to-force-browser-download/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Session Sharing Among Subdomains</title>
		<link>http://www.markdeepwell.com/2010/03/php-session-sharing-among-subdomains/</link>
		<comments>http://www.markdeepwell.com/2010/03/php-session-sharing-among-subdomains/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 01:14:50 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Session Sharing]]></category>
		<category><![CDATA[Subdomain]]></category>

		<guid isPermaLink="false">http://www.markdeepwell.com/?p=477</guid>
		<description><![CDATA[PHP supports sharing sessions among subdomains which can be very useful for sharing cookies and sessions among multiple web applications. I wanted my users to remain logged in while navigating from www.example.com to site1.example.com. By default PHP will treat these domains as two separate sites and users would have to login to each subdomain. All [...]]]></description>
			<content:encoded><![CDATA[<p>PHP supports sharing sessions among subdomains which can be very useful for sharing cookies and sessions among multiple web applications.</p>
<p>I wanted my users to remain logged in while navigating from <strong>www.example.com</strong> to <strong>site1.example.com</strong>. By default PHP will treat these domains as two separate sites and users would have to login to each subdomain. </p>
<p>All you have to do is to either set the following setting in your php.ini file:<br />
<code>session.cookie_domain = .example.com</code></p>
<p>Or, set it from within your code before you create your session:<br />
<code>ini_set("session.cookie_domain", ".example.com");<br />
session_start();</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.markdeepwell.com/2010/03/php-session-sharing-among-subdomains/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Validating a Facebook Session Within an iFrame</title>
		<link>http://www.markdeepwell.com/2010/02/validating-a-facebook-session-within-an-iframe/</link>
		<comments>http://www.markdeepwell.com/2010/02/validating-a-facebook-session-within-an-iframe/#comments</comments>
		<pubDate>Thu, 04 Feb 2010 02:18:51 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Web Application]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[iFrame]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.markdeepwell.com/?p=470</guid>
		<description><![CDATA[Facebook takes security seriously and there are many many things a Facebook app cannot do. Sometimes it is necessary to create an iFrame and load the page in to work around Facebook's security model. This example shows how you can continue to use the $facebook->require_login() method while you are inside an iFrame. Each Facebook request [...]]]></description>
			<content:encoded><![CDATA[<p>Facebook takes security seriously and there are many many things a Facebook app cannot do. Sometimes it is necessary to create an iFrame and load the page in to work around Facebook's security model. This example shows how you can continue to use the $facebook->require_login() method while you are inside an iFrame.</p>
<p>Each Facebook request to your application contains a number of parameters that you can use to  authenticate if the request really came from Facebook and if the user is actually logged in. These parameters looks like this:</p>
<pre>Array
(
    [fb_sig_in_canvas] =&gt; 1
    [fb_sig_request_method] =&gt; GET
    [fb_sig_friends] =&gt; 12345678,123456789,...
    [fb_sig_locale] =&gt; en_US
    [fb_sig_in_new_facebook] =&gt; 1
    [fb_sig_time] =&gt; 1265247656.6432
    [fb_sig_added] =&gt; 1
    [fb_sig_profile_update_time] =&gt; 1261813927
    [fb_sig_expires] =&gt; 1265248900
    [fb_sig_user] =&gt; 1234567
    [fb_sig_session_key] =&gt; 2.18zPq2sNPEE6sn0wpMLc5w__.3600.1265248800-1234567
    [fb_sig_api_key] =&gt; ab6c2d2604ae9604be0efef88315c53e
    [fb_sig_app_id] =&gt; 289424642699
    [fb_sig] =&gt; 575ed0ccd0c9b3ea2d5d7c5417187de6
)
</pre>
<p>If you create an iFrame in your facebook page, the parameters will be passed to the iFrame but by will not automatically be passed from one request to the next. Once the user clicks on a link or you try to do an ajax request, you will not be able to validate the user. The simple trick to keep the authorization is to pass the fb_sig_* parameters to request. A handy PHP function like this will help:</p>
<div class="igBar"><span id="lphp-14"><a href="#" onclick="javascript:showPlainTxt('php-14'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">PHP:</span>
<div id="php-14">
<div class="php">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#000000; font-weight:bold;">function</span> fb_vars<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#0000FF;">$fb_vars</span> = <a href="http://www.php.net/array"><span style="color:#000066;">array</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#616100;">foreach</span> <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$_GET</span> <span style="color:#616100;">as</span> <span style="color:#0000FF;">$key</span> =&gt; <span style="color:#0000FF;">$value</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#616100;">if</span> <span style="color:#006600; font-weight:bold;">&#40;</span><a href="http://www.php.net/strpos"><span style="color:#000066;">strpos</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF;">$key</span>, <span style="color:#FF0000;">"fb_sig"</span><span style="color:#006600; font-weight:bold;">&#41;</span> !== <span style="color:#000000; font-weight:bold;">false</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#123;</span>&nbsp; &nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; &nbsp; <span style="color:#0000FF;">$fb_vars</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#0000FF;">$key</span>.<span style="color:#FF0000;">"="</span>.<span style="color:#0000FF;">$value</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; &nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span>&nbsp; &nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color:#616100;">return</span> <a href="http://www.php.net/implode"><span style="color:#000066;">implode</span></a><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#FF0000;">'&amp;'</span>, <span style="color:#0000FF;">$fb_vars</span><span style="color:#006600; font-weight:bold;">&#41;</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>If you append the result of that function to the query string of each request, the $facebook-&gt;require_login() call and the $facebook-&gt;validate_fb_params() can then successfully validate if your user is from Facebook.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markdeepwell.com/2010/02/validating-a-facebook-session-within-an-iframe/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building for Mobile with Device Orientation</title>
		<link>http://www.markdeepwell.com/2010/01/building-for-mobile-with-device-orientation/</link>
		<comments>http://www.markdeepwell.com/2010/01/building-for-mobile-with-device-orientation/#comments</comments>
		<pubDate>Tue, 26 Jan 2010 16:54:29 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Web Application]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Device Orientation]]></category>
		<category><![CDATA[Fennec]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Mobile]]></category>

		<guid isPermaLink="false">http://www.markdeepwell.com/?p=460</guid>
		<description><![CDATA[Mozilla Firefox 3.5 and Firefox for Mobile 1.0 (Fennec) both have support for modifying a web applications look based on screen dimensions and current orientation. These abilities give web developers the power to build better web applications for mobile devices and the ability to optimize the browsing experience when screen space is constrained. CSS Orientation [...]]]></description>
			<content:encoded><![CDATA[<p>Mozilla Firefox 3.5 and Firefox for Mobile 1.0 (Fennec) both have support for modifying a web applications look based on screen dimensions and current orientation. These abilities give web developers the power to build better web applications for mobile devices and the ability to optimize the browsing experience when screen space is constrained.</p>
<h3>CSS Orientation Properties</h3>
<p>Web applications look and feel is defined by a CSS file, so therefore the Firefox developers made it super easy to tie current orientation and screen dimensions into which CSS file to load.</p>
<p>For examaple: If the browser is in portrait mode, a single CSS media parameter will specify which styles to use:</p>
<div class="igBar"><span id="ljavascript-19"><a href="#" onclick="javascript:showPlainTxt('javascript-19'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
<div id="javascript-19">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">@media all and <span style="color: #66cc66;">&#40;</span>orientation: portrait<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> ... <span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>In the same way, you can create a custom CSS stylesheet for users who are browsing with a screen size between 500 and 700 pixels:</p>
<div class="igBar"><span id="ljavascript-20"><a href="#" onclick="javascript:showPlainTxt('javascript-20'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
<div id="javascript-20">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">@media screen and <span style="color: #66cc66;">&#40;</span>min-width: 500px<span style="color: #66cc66;">&#41;</span> and <span style="color: #66cc66;">&#40;</span>max-width: 700px<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> ... <span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<h3>Orientation Events</h3>
<p>Firefox 3.6 adds support for orientation events in JavaScript, so you can get current updates of how the user is holding their mobile device:</p>
<div class="igBar"><span id="ljavascript-21"><a href="#" onclick="javascript:showPlainTxt('javascript-21'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
<div id="javascript-21">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">window.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">"MozOrientation"</span>, handleOrientation, <span style="color: #003366; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Once you register the event handler, the handleOrientation function will receive an object specifying the x, y, and z value of the devices current position:</p>
<div class="igBar"><span id="ljavascript-22"><a href="#" onclick="javascript:showPlainTxt('javascript-22'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
<div id="javascript-22">
<div class="javascript">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">function</span> handleOrientation<span style="color: #66cc66;">&#40;</span>orientData<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">var</span> x = orientData.<span style="color: #006600;">x</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">var</span> y = orientData.<span style="color: #006600;">y</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #003366; font-weight: bold;">var</span> z = orientData.<span style="color: #006600;">z</span>;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>With those parameters and a game timer, you can probably build the <a href="http://www.turbosquid.com/FullPreview/Index.cfm/ID/275316">Labyrinth game</a>.</p>
<p>For those of your that are ready to start experimenting with this API right away, Mozilla Developer Center has the full <a href="https://developer.mozilla.org/en/Detecting_device_orientation">Firefox orientation documentation</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markdeepwell.com/2010/01/building-for-mobile-with-device-orientation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Cost of Endorsing H.264</title>
		<link>http://www.markdeepwell.com/2010/01/the-cost-of-endorsing-h-264/</link>
		<comments>http://www.markdeepwell.com/2010/01/the-cost-of-endorsing-h-264/#comments</comments>
		<pubDate>Sat, 23 Jan 2010 18:20:52 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Web]]></category>
		<category><![CDATA[H.264]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Ogg Theora]]></category>
		<category><![CDATA[Open Web]]></category>
		<category><![CDATA[Vimeo]]></category>
		<category><![CDATA[YouTube]]></category>

		<guid isPermaLink="false">http://www.markdeepwell.com/?p=454</guid>
		<description><![CDATA[As you've probably heard, both YouTube and Vimeo have released beta support to their massively popular websites to play videos using the HTML5 video tag instead of Flash. While I am glad the video sites are finally switching to the native HTML video tag, I am perplexed why they have gone with the non-free option. [...]]]></description>
			<content:encoded><![CDATA[<p>As you've probably heard, both <a href="http://www.youtube.com/html5">YouTube</a> and <a href="http://www.vimeo.com/blog:268">Vimeo</a> have released beta support to their massively popular websites to play videos using the <a href="http://www.markdeepwell.com/2009/07/importance-of-the-html-video-tag/">HTML5 video tag</a> instead of Flash. While I am glad the video sites are <strong>finally</strong> switching to the native HTML video tag, I am perplexed why they have gone with the non-free option.</p>
<p>Firefox, Safari, Google Chrome, and soon Opera all support the HTML5 video tag with the ability to play Ogg Theora encoded videos (except Safari). On the other hand, H.264 is only supported by Google Chrome and Safari. Both of these formats do the same thing, they specify a compression standard that allows for efficient playback at relatively small file sizes. There are a number of technical differences, but generally, they <a href="http://people.xiph.org/~greg/video/ytcompare/comparison.html">preform relatively the same</a>. The big difference between the two is that Ogg Theora is royalty free and available for anybody to use, while H.264 is encumbered by patents held by the MPEG LA association. This same organization will charge anybody who uses it a <a href="http://www.streaminglearningcenter.com/articles/h264-royalties-what-you-need-to-know.html">hefty royalty fee</a> starting in 2011.</p>
<p>If you have a personal blog and want to put a video on your website using H.264 this means you need to have to hire a lawyer to create a deal with the MPEG LA to allow you to use their codec. This will either cost you a lot of money, or they will not allow you to do it. They do have the right to simply deny you if they don't feel like it.</p>
<p>However, if you use the open <a href="http://www.theora.org/">Ogg Theora</a> format, you are free to simply upload the video to your website to start using it, the same as uploading an image. Ogg Theora is not covered by any patents and is royalty free.</p>
<p>I don't understand why both YouTube and Vimeo are both going the non-free route. Is it simply because they have the money to pay MPEG LA? Whatever the case, endorsing H.264 encoded videos as the format for video on the web is an option for large companies with money to pay, but it's completely the wrong choice for  blog writers and any small or medium sized organization.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markdeepwell.com/2010/01/the-cost-of-endorsing-h-264/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
