<?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 &#187; Software Development</title>
	<atom:link href="http://www.markdeepwell.com/category/software-development/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>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>Facebook vs You!</title>
		<link>http://www.markdeepwell.com/2009/12/facebook-vs-you/</link>
		<comments>http://www.markdeepwell.com/2009/12/facebook-vs-you/#comments</comments>
		<pubDate>Wed, 23 Dec 2009 06:31:49 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Web Application]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Facebook]]></category>
		<category><![CDATA[Facebook App]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://www.markdeepwell.com/?p=445</guid>
		<description><![CDATA[Have you had the... how should I describe it... experience of writing a Facebook application? No? OK, here's an introduction to what you can expect. When developing an application you must learn Rule #1 Facebook is the gatekeeper. Everything you do, be it HTML, CSS or JavaScript, is restricted by Facebook. Only the commands, functions, [...]]]></description>
			<content:encoded><![CDATA[<p>Have you had the... how should I describe it... <strong>experience</strong> of writing a Facebook application? No? OK, here's an introduction to what you can expect.</p>
<p>When developing an application you must learn Rule #1 <strong>Facebook is the gatekeeper</strong>. Everything you do, be it HTML, CSS or JavaScript, is restricted by Facebook. Only the commands, functions, CSS properties, HTML tags etc. that Facebook allows are permissible. If you have an error in your HTML such as an unclosed tag or if you try to use a CSS property that does not exist, Facebook will render a very nice message saying you made an error.</p>
<p>Rule #2 <strong>The never ending cycle</strong>. The Facebook platform is constantly changing and APIs that you are using in your application could disappear one day without any notice. It's the life of a Facebook application, working one instant, inexplicably broken the next. Be prepared for irregular maintenance just to keep your application working.</p>
<p>A Facebook Application  lives in the world of Facebook and while it might initially seem  like you're developing a standard web application you are not. Rule #3 <strong>You're application is on the Facebook web</strong>. It's not a regular web application which is a very slight but critical distinction. Facebook has used their powers as the gatekeeper to make modifications to the web. Some HTML tags are allowed, some are not. <a href="http://wiki.developers.facebook.com/index.php/FBJS#FBJS_DOM_Objects">JavaScript has been altered</a> to remove a lot of its power and replace only some of them with Facebook specific functions and even CSS has restrictions. Don't expect existing code to function when placed in the Facebook web.</p>
<h3>Additional Caveats</h3>
<ul>
<li>You cannot include any external JavaScript or style sheet files, they must be included in-line. This is so Facebook can parse them and allow only approved commands. Yes it enhances the security of the social networking site as a whole, but it will slow down your development time.</li>
<li>Facebook will filter, compile, and drastically alter your original code. Clicking view-source on a Facebook page with your application will show your JavaScript code mushed into awkward Facebook functions.</li>
</ul>
<p>Do you see that it's a bit of a battle of you against the mighty Facebook? Don't sweat too much, other developers have persevered and with a few wounds and time you can build and maintain a successful Facebook application. Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markdeepwell.com/2009/12/facebook-vs-you/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quality Software @ Thirdi</title>
		<link>http://www.markdeepwell.com/2009/12/quality-software-thirdi/</link>
		<comments>http://www.markdeepwell.com/2009/12/quality-software-thirdi/#comments</comments>
		<pubDate>Tue, 08 Dec 2009 04:55:09 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Software Quality]]></category>

		<guid isPermaLink="false">http://www.markdeepwell.com/?p=434</guid>
		<description><![CDATA[I work at Thirdi Software, and one of the initiatives I started was a Quality Software @ Thirdi email newsletter and series of blog posts highlighting quality solutions to software problems. It’s mostly targeted at developers but there’s also some insights to be had for the quality assurance team and for project managers. The posts [...]]]></description>
			<content:encoded><![CDATA[<p>I work at <a onclick="javascript:pageTracker._trackPageview('/outbound/article/http://www.thirdi.com');" href="http://www.thirdi.com/">Thirdi  Software</a>, and one of the initiatives I started was a <strong>Quality  Software @ Thirdi</strong> email newsletter and series of blog posts  highlighting quality solutions to software problems. It’s mostly  targeted at developers but there’s also some insights to be had for the  quality assurance team and for project managers.</p>
<p>The posts were originally posted on <a onclick="javascript:pageTracker._trackPageview('/outbound/article/http://senses.thirdi.com');" href="http://senses.thirdi.com/">Senses</a> and reproduced here for archival purposes. They touch on a lot of basic information for software developers including software design, upcoming technologies and useful tips to make your life easier.</p>
<p>Check the <a href="http://www.markdeepwell.com/quality-software/">Quality Software</a> page for links to each article.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markdeepwell.com/2009/12/quality-software-thirdi/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Intro to Objects in JavaScript</title>
		<link>http://www.markdeepwell.com/2009/10/intro-to-objects-in-javascript/</link>
		<comments>http://www.markdeepwell.com/2009/10/intro-to-objects-in-javascript/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 06:23:03 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[OOP]]></category>

		<guid isPermaLink="false">http://www.markdeepwell.com/?p=317</guid>
		<description><![CDATA[Despite what you might think, JavaScript supports programming in full object oriented style including inheritance, encapsulation and polymorphism. But before we dive into all those topics I'm going to start with the basics and demonstrate how to create and use a simple JavaScript object. Lets say you have a web application that needs to track [...]]]></description>
			<content:encoded><![CDATA[<p>Despite what you might think, JavaScript supports programming in full object oriented style including inheritance, encapsulation and polymorphism. But before we dive into all those topics I'm going to start with the basics and demonstrate how to create and use a simple JavaScript object.</p>
<p>Lets say you have a web application that needs to track how long an AJAX request took. If you were writing it in Ruby, PHP or Python you'd have a timer object that you can start() and stop() and a seconds() method to get the number of seconds that passed between calling the first two methods.</p>
<p>To build this in JavaScript we first create our constructor:</p>
<div class="igBar"><span id="ljavascript-18"><a href="#" onclick="javascript:showPlainTxt('javascript-18'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
<div id="javascript-18">
<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;">Timer = <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><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;">&nbsp; <span style="color: #003366; font-weight: bold;">var</span> seconds_passed = <span style="color: #CC0000;color:#800000;">0</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>
Here we are creating a Timer object with a private  seconds_passed variable. To create this object we we simply create a new timer:</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;"><span style="color: #003366; font-weight: bold;">var</span> elapsed_timer = <span style="color: #003366; font-weight: bold;">new</span> Timer<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
This timer object now needs some public methods. We can attach a public method by using this.method_name:</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;">Timer = <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><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;">&nbsp; <span style="color: #003366; font-weight: bold;">var</span> seconds_passed = <span style="color: #CC0000;color:#800000;">0</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: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">start</span> = <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#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; &nbsp; <span style="color: #009900; font-style: italic;">// implementation here</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: #66cc66;">&#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;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Our Timer class now has a start() function. Additional public methods can be added in the same way.</p>
<p>To add a private method, don't define it with the <em>this</em> keyword but instead create a regular function inside the class:</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;">Timer = <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><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;">&nbsp; <span style="color: #003366; font-weight: bold;">function</span> increment<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#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; &nbsp; <span style="color: #009900; font-style: italic;">// implementation of private method here</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: #66cc66;">&#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;"><span style="color: #66cc66;">&#125;</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p>
Now we have a Timer object with a public start method and a private increment method. The rest of the class is fairly simple, so lets jump to the finished solution.</p>
<h3>Complete Example</h3>
<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;">Timer = <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><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;">&nbsp; <span style="color: #003366; font-weight: bold;">var</span> timeout_id = <span style="color: #003366; font-weight: bold;">null</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: #003366; font-weight: bold;">var</span> seconds_passed = <span style="color: #CC0000;color:#800000;">0</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</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: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">start</span> = <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><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;">&nbsp; &nbsp; increment<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#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: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</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: #000066; font-weight: bold;">this</span>.<span style="color: #000066;">stop</span> = <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><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;">&nbsp; &nbsp; clearTimeout<span style="color: #66cc66;">&#40;</span>timeout_id<span style="color: #66cc66;">&#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; timeout_id = <span style="color: #003366; font-weight: bold;">null</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: #66cc66;">&#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: #000066; font-weight: bold;">this</span>.<span style="color: #006600;">seconds</span> = <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#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; &nbsp; <span style="color: #000066; font-weight: bold;">return</span> seconds_passed;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp; <span style="color: #66cc66;">&#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: #003366; font-weight: bold;">function</span> increment<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#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; &nbsp; seconds_passed++;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</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; timeout_id = window.<span style="color: #006600;">setTimeout</span><span style="color: #66cc66;">&#40;</span></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: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#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; &nbsp; &nbsp; &nbsp; increment<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</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: #66cc66;">&#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; &nbsp; &nbsp; , <span style="color: #CC0000;color:#800000;">1000</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: #66cc66;">&#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: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color: #66cc66;">&#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;"><span style="color: #003366; font-weight: bold;">var</span> elapsed_timer = <span style="color: #003366; font-weight: bold;">new</span> Timer<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#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;">elapsed_timer.<span style="color: #006600;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</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: #009900; font-style: italic;">// do some stuff</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</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;">elapsed_timer.<span style="color: #000066;">stop</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#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: #000066;">alert</span><span style="color: #66cc66;">&#40;</span>elapsed_timer.<span style="color: #006600;">seconds</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>; </div>
</li>
</ol>
</div>
</div>
</div>
<p>
There you have it. A simple JavaScript timer to keep track of time.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markdeepwell.com/2009/10/intro-to-objects-in-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Software Complexity</title>
		<link>http://www.markdeepwell.com/2009/09/software-complexity/</link>
		<comments>http://www.markdeepwell.com/2009/09/software-complexity/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 05:39:34 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Software Development]]></category>
		<category><![CDATA[managing complexity]]></category>
		<category><![CDATA[Software Quality]]></category>

		<guid isPermaLink="false">http://www.markdeepwell.com/?p=245</guid>
		<description><![CDATA[Have you ever worked on a software project where you had no idea what would happen to other parts of the system if you made a code change? I have, but I have been able to ask developers on my team that know the system better than I do. If it's a larger software project [...]]]></description>
			<content:encoded><![CDATA[<p>Have you ever worked on a software project where you had no idea what would happen to other parts of the system  if you made a code change? I have, but I have been able to ask developers on my team that know the system better than I do.</p>
<p>If it's a larger software project and nobody on the team knows what a change would do, then it would be fair to say the software is overly complex and making forward progress is like wading through a swamp. Software projects, especially larger software projects absolutely must have code that is understandable. When designing software applications, a key component to the architecture is managing complexity to a workable level.</p>
<blockquote><p>Managing complexity is the most important technical topic in software development. In my view, it's so important that Software's Primary Technical Imperative has to be <em><strong>managing complexity</strong>.</em></p>
<p>- Steve McConnell in Code Complete</p></blockquote>
<p>Unless its a small project, no software developer can contain the design, constraints, and all the technical details in their head at the same time. Software must be made modular so that a developer can work on one section of code without worrying about the rest of the project.</p>
<p>How do you deal with complexity?</p>
<ol>
<li>Break up the problem into sub-problems and sub-tasks so you don't have to solve everything at the same time.</li>
<li>Contain the complexity to one part of the code.</li>
<li>Before you solve the complex issue take a step back and make sure you have to solve it that way. There might be a vastly simpler problem that you can solve that will still fulfill your requirements.</li>
</ol>
<p>Tackle software complexity before it defeats your software project.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markdeepwell.com/2009/09/software-complexity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
