<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.2.3" -->
<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/"
	>

<channel>
	<title>Whompbox</title>
	<link>http://www.whompbox.com</link>
	<description>Code &#38; Stuff — Mostly Code</description>
	<pubDate>Tue, 18 Aug 2009 16:20:50 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.3</generator>
	<language>en</language>
			<item>
		<title>Tab completion for mercurial qup extension</title>
		<link>http://www.whompbox.com/?p=14</link>
		<comments>http://www.whompbox.com/?p=14#comments</comments>
		<pubDate>Tue, 18 Aug 2009 16:20:50 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.whompbox.com/?p=14</guid>
		<description><![CDATA[The qup extension for mercurial (hg) is an extension that allows you to move MQ patches to top of unapplied part of series without using a text editor. This is pretty handy for juggling patches.
However when I installed the extension, I was a little annoyed to see that there was no bash tab completion for [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://mercurial.selenic.com/wiki/QupExtension">qup extension</a> for mercurial (hg) is an extension that allows you to move <a href="http://mercurial.selenic.com/wiki/MqExtension">MQ</a> patches to top of unapplied part of series without using a text editor. This is pretty handy for juggling patches.</p>
<p>However when I installed the extension, I was a little annoyed to see that there was no bash tab completion for patch names. This was pretty important for me, saying as my patch names can be pretty long (I like to keep them descriptive).</p>
<p>Thankfully, I found an easy way to enable this in Ubuntu:</p>
<p>Just add the following to your <code>/etc/bash_completion.d/mercurial</code> file:</p>
<pre style="font-size: 12px"><code class="script">_hg_cmd_qup()
{
	_hg_cmd_qpush
}</code></pre>
<p>Then you&#8217;ll need to <code>source</code> the file to enable it:</p>
<p><code class="console">$ source /etc/bash_completion.d/mercurial</code></p>
<p>This should work with any OS with bash, you just might have to go looking for the right bash_completion file.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.whompbox.com/?feed=rss2&amp;p=14</wfw:commentRss>
		</item>
		<item>
		<title>IETester rendering accuracy</title>
		<link>http://www.whompbox.com/?p=13</link>
		<comments>http://www.whompbox.com/?p=13#comments</comments>
		<pubDate>Sat, 02 Aug 2008 13:55:06 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
		
		<category><![CDATA[browsers]]></category>

		<category><![CDATA[web development]]></category>

		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://www.whompbox.com/?p=13</guid>
		<description><![CDATA[Anyone interested in testing websites for cross-browser compatibility should have a look at IETester.  This free tool allows you to test 4 versions of IE (5.5, 6, 6 and 8beta1 (*Update: this has since been upgraded to 8beta2)) all from the same installation of windows. 
This is a god-send for people who develop websites [...]]]></description>
			<content:encoded><![CDATA[<p>Anyone interested in testing websites for cross-browser compatibility should have a look at <a href="http://www.my-debugbar.com/wiki/IETester/HomePage" title="IETester Homepage">IETester</a>.  This free tool allows you to test 4 versions of <abbr title="Internet Explorer">IE</abbr> (5.5, 6, 6 and 8beta1 (*Update: this has since been upgraded to 8beta2)) all from the same installation of windows. </p>
<p>This is a god-send for people who develop websites in linux (myself included).  Before I had a host of virtual machines running WinXP, each one with a different version of IE on it.  This may seem a bit bloated, but I was convinced that many of the multiple IE solutions already in the wild <em>seemed</em> alright, but missed some of the <a href="http://www.quirksmode.org/browsers/multipleie.html" title="Multiple IE Browsers" >subtle rendering problems of the proper versions</a>.  It would be awful to think a site was rendering properly in all target browsers, when in fact some subtle things went unnoticed.</p>
<p>I viewed this product with similar skepticism, but the benefits that it would bring me still warranted a look.  So I gave it a go, and decided to test the rendering of the <a href="http://acid2.acidtests.org/#top" title="Acid 2 Test">Acid2</a> and <a href="http://acid2.acidtests.org/#top" title="Acid 3 Test">Acid3</a> tests.  The advantage of these tests is that they also probe the javascript support for each browser as well as the visual rendering.  Accurate rendering of these tests would indicated that IETester is behaving exactly as each browser should.</p>
<h3>Results</h3>
<p>The results are pleasing:</p>
<h4>Acid2</h4>
<table class="gal">
<tr>
<th>IE Version</th>
<th>IETester</th>
<th>Reference</th>
</tr>
<tr>
<td>IE 5.5</td>
<td><a href="http://www.whompbox.com/wp-content/uploads/2008/07/acid2-IE55.png" title=""><img src="http://www.whompbox.com/wp-content/uploads/2008/07/thumb_acid2-IE55.png" alt="Acid2 Test on IE5.5 using IETester" /></a></td>
<td><a href="http://www.whompbox.com/wp-content/uploads/2008/07/acid2-IE55-ref.png" title="Acid2 Test on IE5.5 reference image"><img src="http://www.whompbox.com/wp-content/uploads/2008/07/thumb_acid2-IE55-ref.png" alt="Acid2 Test on IE5.5 reference image" /></a></td>
</tr>
<tr>
<td>IE 6</td>
<td><a href="http://www.whompbox.com/wp-content/uploads/2008/07/acid2-IE6.png" title=""><img src="http://www.whompbox.com/wp-content/uploads/2008/07/thumb_acid2-IE6.png" alt="Acid2 Test on IE6 using IETester" /></a></td>
<td><a href="http://www.whompbox.com/wp-content/uploads/2008/07/acid2-IE6-ref.png" title="Acid2 Test on IE6 reference image"><img src="http://www.whompbox.com/wp-content/uploads/2008/07/thumb_acid2-IE6-ref.png" alt="Acid2 Test on IE6 reference image" /></a></td>
</tr>
<tr>
<td>IE 7</td>
<td><a href="http://www.whompbox.com/wp-content/uploads/2008/07/acid2-IE7.png" title=""><img src="http://www.whompbox.com/wp-content/uploads/2008/07/thumb_acid2-IE7.png" alt="Acid2 Test on IE7 using IETester" /></a></td>
<td><a href="http://www.whompbox.com/wp-content/uploads/2008/07/acid2-IE7-ref.png" title="Acid2 Test on IE7 reference image"><img src="http://www.whompbox.com/wp-content/uploads/2008/07/thumb_acid2-IE7-ref.png" alt="Acid2 Test on IE7 reference image" /></a></td>
</tr>
<tr>
<td>IE 8b1</td>
<td><a href="http://www.whompbox.com/wp-content/uploads/2008/07/acid2-IE8.png" title=""><img src="http://www.whompbox.com/wp-content/uploads/2008/07/thumb_acid2-IE8.png" alt="Acid2 Test on IE8 using IETester" /></a></td>
<td><a href="http://www.whompbox.com/wp-content/uploads/2008/07/acid2-IE8-ref.png" title="Acid2 Test on IE8 reference image"><img src="http://www.whompbox.com/wp-content/uploads/2008/07/thumb_acid2-IE8-ref.png" alt="Acid2 Test on IE8 reference image" /></a></td>
</tr>
</table>
<h4>Acid3</h4>
<table class="gal">
<tr>
<th>IE Version</th>
<th>IETester</th>
<th>Reference</th>
</tr>
<tr>
<td>IE 5.5</td>
<td><a href="http://www.whompbox.com/wp-content/uploads/2008/07/acid3-IE55.png" title=""><img src="http://www.whompbox.com/wp-content/uploads/2008/07/thumb_acid3-IE55.png" alt="Acid3 Test on IE5.5 using IETester" /></a></td>
<td><a href="http://www.whompbox.com/wp-content/uploads/2008/07/acid3-IE55-ref.png" title="Acid3 Test on IE5.5 reference image"><img src="http://www.whompbox.com/wp-content/uploads/2008/07/thumb_acid3-IE55-ref.png" alt="Acid3 Test on IE5.5 reference image" /></a></td>
</tr>
<tr>
<td>IE 6</td>
<td><a href="http://www.whompbox.com/wp-content/uploads/2008/07/acid3-IE6.png" title=""><img src="http://www.whompbox.com/wp-content/uploads/2008/07/thumb_acid3-IE6.png" alt="Acid3 Test on IE6 using IETester" /></a></td>
<td><a href="http://www.whompbox.com/wp-content/uploads/2008/07/acid3-IE6-ref.png" title="Acid3 Test on IE6 reference image"><img src="http://www.whompbox.com/wp-content/uploads/2008/07/thumb_acid3-IE6-ref.png" alt="Acid3 Test on IE6 reference image" /></a></td>
</tr>
<tr>
<td>IE 7</td>
<td><a href="http://www.whompbox.com/wp-content/uploads/2008/07/acid3-IE7.png" title=""><img src="http://www.whompbox.com/wp-content/uploads/2008/07/thumb_acid3-IE7.png" alt="Acid3 Test on IE7 using IETester" /></a></td>
<td><a href="http://www.whompbox.com/wp-content/uploads/2008/07/acid3-IE7-ref.png" title="Acid3 Test on IE7 reference image"><img src="http://www.whompbox.com/wp-content/uploads/2008/07/thumb_acid3-IE7-ref.png" alt="Acid3 Test on IE7 reference image" /></a></td>
</tr>
<tr>
<td>IE 8b1</td>
<td><a href="http://www.whompbox.com/wp-content/uploads/2008/07/acid3-IE8.png" title=""><img src="http://www.whompbox.com/wp-content/uploads/2008/07/thumb_acid3-IE8.png" alt="Acid2 Test on IE8 using IETester" /></a></td>
<td><a href="http://www.whompbox.com/wp-content/uploads/2008/07/acid3-IE8-ref.png" title="Acid3 Test on IE8 reference image"><img src="http://www.whompbox.com/wp-content/uploads/2008/07/thumb_acid3-IE8-ref.png" alt="Acid3 Test on IE8 reference image" /></a></td>
</tr>
</table>
<p>The screenshots show great rendering compared to the reference images.  Differences in resolution and viewport size makes some of the renderings look off, but the actual content is rendered properly.  The eagle-eyed will have spotted that some of the numbers in the Acid3 tests are different.  I believe this is due to the screenshots being taken before the javascript tests were completed.  In any case, the rest of the rendering of the Acid3 is spot on for all browsers, so I&#8217;m not worried about this little difference.</p>
<h3>Conclusions</h3>
<p>This is a fantastic tool for cross-browser testing. I have enough confidence in its correctness to now get rid of my entire farm of virtual machines.  Not only is it accurate, but it is also very nice to use, with a well thought out user-interface. There are some little bugs in the program itself, but this is to be expected from such a young project.  None of them are obtrusive enough to put me off using the program. On the whole I&#8217;m very happy to use it&mdash;saves me a lot of hassle.</p>
<h3>Resources</h3>
<ul>
<li><a href="http://www.my-debugbar.com/wiki/IETester/HomePage" title="IETester Homepage">IETester Homepage</a> &ndash; Get IETester here</li>
<li><a href="http://browsershots.org/" title="Browsershots Service">Browsershots</a> &ndash; A fantastic free service that renders a screenshot your website in a practically every browser in the wild&mdash;and then some! (Used for the reference images above.)</li>
</ul>
<h3>Your Thoughts</h3>
<p>Comments, questions and suggestions are always welcome. Just leave a comment.</p>
<p>&mdash; Martin McNickle</p>
]]></content:encoded>
			<wfw:commentRss>http://www.whompbox.com/?feed=rss2&amp;p=13</wfw:commentRss>
		</item>
		<item>
		<title>Starting svnserve at boot time</title>
		<link>http://www.whompbox.com/?p=12</link>
		<comments>http://www.whompbox.com/?p=12#comments</comments>
		<pubDate>Mon, 07 Jul 2008 12:33:00 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
		
		<category><![CDATA[server configuration]]></category>

		<category><![CDATA[subversion]]></category>

		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://www.whompbox.com/?p=12</guid>
		<description><![CDATA[This quick article explains how to get the subversion (SVN) daemon, svnserve, to start everytime your server restarts.
Motivation
We&#8217;re currently moving all of our repositories to a brand new, purpose built development server.  In an attempt to do everything right from the start, this particular task was on my to-do list.  Everytime the old [...]]]></description>
			<content:encoded><![CDATA[<p>This quick article explains how to get the subversion (SVN) daemon, svnserve, to start everytime your server restarts.</p>
<h4>Motivation</h4>
<p><a href="http://www.cazinc.co.uk" title="Cazinc Web Design">We&#8217;re</a> currently moving all of our repositories to a brand new, purpose built development server.  In an attempt to do everything right from the start, this particular task was on my to-do list.  Everytime the old server was restarted, I had to go in and start the subversion server manually.  This script does away with that.</p>
<h4>How?</h4>
<p>Download the <a href="http://www.whompbox.com/wp-content/uploads/2008/07/svnserve" title="svnserve startup script">startup script</a> and copy it to the <code>/etc/init.d/</code> folder.  You will need <strong>superuser</strong> access for this.  (Either sign in as root, or type <code>sudo</code> before each of the commands). This can be done in the terminal:</p>
<p><code class="console">$ cd /etc/init.d/<br />
$ wget http://www.whompbox.com/wp-content/uploads/2008/07/svnserve<br />
</code></p>
<p>Next you want to make the script executable:</p>
<p><code class="console">$ chmod +x svnserve</code></p>
<p>Now add it to the startup sequence:</p>
<p><code class="console">$ update-rc.d svnserve defaults</code></p>
<p>Now you should configure the few things in the script which are specific to you.  These can be found at the top of the file.  The two that you are most likely to change are</p>
<p><code class="script">SVN_ROOT_PATH<br />
SVNUSER<br />
</code></p>
<p>which tell the scripts where your repositories are on the system and what username you want the daemon to run under.</p>
<p>Finally:</p>
<p><code class="console">$ /etc/init.d/svnserve start</code></p>
<p>to start the server.</p>
<h4>Resources</h4>
<p><a href="http://www.whompbox.com/wp-content/uploads/2008/07/svnserve" title="svnserve startup script">svnserve startup script</a></p>
<h4>Your Thoughts</h4>
<p>Comments, questions and suggestions are always welcome.  Just leave a comment.</p>
<p>&mdash; Martin McNickle</p>
]]></content:encoded>
			<wfw:commentRss>http://www.whompbox.com/?feed=rss2&amp;p=12</wfw:commentRss>
		</item>
		<item>
		<title>Subversion / Basecamp integration using PHP</title>
		<link>http://www.whompbox.com/?p=5</link>
		<comments>http://www.whompbox.com/?p=5#comments</comments>
		<pubDate>Sun, 28 Oct 2007 15:21:57 +0000</pubDate>
		<dc:creator>Martin</dc:creator>
		
		<category><![CDATA[subversion]]></category>

		<category><![CDATA[project management]]></category>

		<category><![CDATA[php]]></category>

		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://www.whompbox.com/?p=5</guid>
		<description><![CDATA[This article explains how to automatically post a message to Basecamp detailing any changes in a Subversion code repository.]]></description>
			<content:encoded><![CDATA[<p>This article explains how to automatically post a message to Basecamp detailing any changes in a Subversion code repository.</p>
<p><a href="http://www.whompbox.com/wp-content/uploads/2007/10/basecampsvn.png" title="BasecampSVN screenshot" onclick="javascript:urchinTracker ('/screenshot/BasecampSVN');"><img src="http://www.whompbox.com/wp-content/uploads/2007/10/basecampsvnsmall.png" alt="basecampsvnsmall.png" class="alignright" /></a></p>
<h4>Motivation</h4>
<p>More and more of the projects (mostly website development) that I am involved with involve a number of developers.  We use <a href="http://www.basecamphq.com/" title="Basecamp Homepage" onclick="javascript:urchinTracker ('/outbound/article/www.basecamphq.com');">Basecamp</a> to keep a tab on our correspondence, deadlines, bugs etc.  This has proved pretty successful, and with the intention of its continued use, I set out to make it more useful for our particular (code-based) needs.</p>
<p>Another tool used on these projects is <a href="http://subversion.tigris.org/" title="Subversion Homepage" onclick="javascript:urchinTracker ('/outbound/article/subversion.tigris.org');">Subversion</a> (SVN), to keep a track of changes in the codebase.  It seemed like a good idea to tie SVN in with Basecamp, keeping the people on the project informed in the changes in the code.</p>
<p>Luckily Basecamp has an open <a href="http://developer.37signals.com/basecamp/" title="Basecamp API" onclick="javascript:urchinTracker ('/outbound/article/developer.37signals.com');">API</a>, making this sort of integration very easy.</p>
<h4>Assumptions</h4>
<p>This article assumes working knowledge of SVN i.e. how to create and access repositories etc.   You should also have full access to the server on which the repository is hosted i.e. an ability to add/remove files, change folder permissions etc.  The installation below is based on a linux system and basic linux console commands are assumed.  A tiny amount of PHP is required.</p>
<h4>Basics</h4>
<p>You must have the API support turned on for your Basecamp account, this can be done in the settings page.</p>
<p>You should have a working SVN repository already installed.  The examples assume the repository is installed at <code>/path/to/repository/</code>.</p>
<h4>Installation</h4>
<p>The script will be run after someone commits a change to the repository.  A default installation of Subversion has a series of scripts that are executed at various stages of the commit process.  These &#8220;hooks&#8221; can be found in the folder <code>/path/to/repository/hooks/</code>.  The one we are interested in is the &#8220;post-commit&#8221; hook.  We will instruct SVN to run our PHP script in this file.</p>
<p>The files in the <code>hooks/</code> folder are just skeleton scripts.  You will notice that they have a <code>.tmpl</code> extension.  This must be removed before SVN processes them:</p>
<p><code class="console">$ cp post-commit.tmpl post-commit</code></p>
<p>The script must also have execution rights:</p>
<p><code class="console">$ chmod a+x post-commit</code></p>
<p>Now it is a matter of installing the custom scripts.</p>
<p>My code is based on a PHP wrapper written by <a href="http://www.quirkey.com" title="Aaron Quint's blog" onclick="javascript:urchinTracker ('/outbound/article/www.quirkey.com');">Aaron Quint</a>.  This bit of code requires two PHP modules to work — HTTP_Request and XML_Serializer.  These may be included in your installation of PHP already.  If not these can be installed via <a href="http://pear.php.net/" title="PEAR homepage" onclick="javascript:urchinTracker ('/outbound/article/pear.php.net');">PEAR</a> (may need root access):</p>
<p><code class="console">$ pear install HTTP_Request XML_Serializer-0.18.0</code></p>
<p>Now download my <a href="http://www.whompbox.com/wp-content/uploads/2007/10/BasecampSVN-0.1.2.tar.gz" title="BasecampSVN code" onclick="javascript:urchinTracker ('/downloads/BasecampSVN'); ">code</a>.  It contains all the files you need.  This can be downloaded from the console using <code>wget</code>.</p>
<p>Unpack this into the <code>hooks/</code> folder:</p>
<p><code class="console">$ tar -xzvf BasecampSVN.tar.gz</code></p>
<p>You now need to configure <code>notify.php</code> with your particular Basecamp details.  These are stored in variables in <code>notify.php</code>:</p>
<p><code class="script">$bc_user<br />
$bc_password<br />
$bc_base_url<br />
$bc_project_id<br />
$bc_category_id<br />
$bc_company_id</code></p>
<p>Their explanations are pretty self-explanatory, but there is additional information in the script.</p>
<p>Now add the following lines to the <code>post-commit</code> file to tell SVN to run the notify script:</p>
<p><code class="script">REPOS="$1"<br />
REV="$2"<br />
php $REPOS/hooks/notify.php $REPOS $REV<br />
</code></p>
<h4>Testing</h4>
<p>Give it a try now, change some files in the repository and commit them.  All going well, you should see a message posted on Basecamp, detailing the changes to the repository.</p>
<p>If this isn&#8217;t the case, you can run the script manually and look for any error messages that may be returned:</p>
<p><code class="console">$ php notify.php /path/to/repository revision_number</code></p>
<h4>Other features</h4>
<p>Just like any other Basecamp message, you can tell the script to send email notifications to people in a certain company and make the post private.  These options can be set in <code>notify.php</code>.</p>
<h4>Conclusion</h4>
<p>This script has certainly proved successful on the projects I have been working on.  It provides the practical advantange of letting the developers see where and when the code has been changed.  It also lets the client of the project see that the project is making progress, something that can be difficult to convince them of at times <img src='http://www.whompbox.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>Special thanks to <a href="http://www.cazinc.co.uk" title="Cazinc Web Design" onclick="javascript:urchinTracker ('/outbound/article/www.cazinc.co.uk');">Cazinc Web Design</a> for supporting the development of this open source project.</p>
<h4>Resources</h4>
<p><a href="http://www.whompbox.com/wp-content/uploads/2007/10/BasecampSVN-0.1.2.tar.gz" title="BasecampSVN code" onclick="javascript:urchinTracker ('/downloads/BasecampSVN'); ">BasecampSVN - v0.1.2</a></p>
<h4>Your Thoughts</h4>
<p>Any problems, bugs, comments or suggestions are always welcome.  Just leave a post below.</p>
<p>— Martin McNickle</p>
]]></content:encoded>
			<wfw:commentRss>http://www.whompbox.com/?feed=rss2&amp;p=5</wfw:commentRss>
		</item>
	</channel>
</rss>

