<?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>gyrmination &#187; Logistical</title>
	<atom:link href="http://ttwhy.org/home/blog/category/logistical/feed/" rel="self" type="application/rss+xml" />
	<link>http://ttwhy.org/home/blog</link>
	<description>from the seeds of gyrm</description>
	<lastBuildDate>Sun, 04 Jul 2010 15:19:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>C# For Programmers</title>
		<link>http://ttwhy.org/home/blog/2010/01/31/c-for-programmers/</link>
		<comments>http://ttwhy.org/home/blog/2010/01/31/c-for-programmers/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 01:09:52 +0000</pubDate>
		<dc:creator>gyrm</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://ttwhy.org/home/blog/?p=188</guid>
		<description><![CDATA[I just breezed through Illustrated C# 2005, and made a list of language features / concepts that struck me for one reason or another, mostly as a function of being either different from (or similar to!) features in other languages I am already familiar with. ref and out parameters pass value objects into or &#8220;out [...]]]></description>
			<content:encoded><![CDATA[<p>I just breezed through <em>Illustrated C# 2005</em>, and made a list of language features / concepts that struck me for one reason or another, mostly as a function of being either different from (or similar to!) features in other languages I am already familiar with.</p>
<dl>
<dt><code>ref</code> and <code>out</code> parameters</dt>
<dd>pass value objects into or &#8220;out of&#8221; methods by reference</dd>
<dt>properties</dt>
<dd>allow exposing properties as fields, backed by getter and/or setter methods</dd>
<dt><code>static</code> constructors</dt>
<dd>where it is possible to initialize static fields</dd>
<dt>finalizers</dt>
<dd>where it is possible to clean up resources used by an instance. Syntax is reminiscent of syntax for C++ destructors.</dd>
<dt>indexers</dt>
<dd>allows the square bracket operator (i.e. <code>[5]</code>) to be applied to instances</dd>
<dt>delegates</dt>
<dd>essentially closures that invoke zero or more methods with the same signature. Event handlers are implemented as delegates, such that adding and removing listeners is accomplished using the <code>+=</code> and <code>-=</code> operators.</dd>
<dt><code>partial</code> classes</dt>
<dd>allow classes to be defined / extended across multiple files</dd>
<dt><code>using</code> statements</dt>
<dd>a convenience construct that maps to a <code>try { ... } finally { ... }</code> block, calling <code>Dispose()</code> (from <code>IDisposable</code>) on the used object if an exception is thrown</dd>
<dt>attributes</dt>
<dd>essentially Java annotations</dd>
<dt>inherited methods with <code>virtual</code>, <code>override</code>, <code>new</code></dt>
<dd>method overridding must be explicitly permitted with <code>virtual</code>. Overriding and hiding also must be explicitly called out, via <code>override</code> and <code>new</code>.</dd>
<dt>iterator blocks, <code>yield return</code> statements</dt>
<dd>when defining new iterators for use in <code>foreach</code> statements</dd>
<dt>nullable value types, <code>??</code> (null coalescing operator)</dt>
<dd>value types can be allowed to have the value <code>null</code>. The null coalescing operator allows an alternative value to be specified more concisely, when a variable is found to be <code>null</code>. Similar to Groovy&#8217;s &#8220;elvis&#8221; operator <code>?:</code> .</dd>
<dt><code>implicit</code> and <code>explicit</code> type conversions</dt>
<dd>conversions can be defined between types for which an inheritance relationship does not exist. Overall, this seems like a confusingly &#8220;clever&#8221; feature to use, and probably best avoided.</dd>
<dt>generics and constraints (<code>where</code> clauses)</dt>
<dd>like Java generics, but with more expressive type constraints expressed as <code>where</code> clauses.</dd>
<dt><code>is</code>, <code>as</code>, <code>typeof()</code></dt>
<dd>how to dynamically check type information; <code>is</code> is like Java&#8217;s <code>instanceof</code>; <code>as</code> is like a C++ <code>dynamic_cast</code>; and <code>typeof()</code> returns a <code>Type</code> object.</dd>
</dl>
]]></content:encoded>
			<wfw:commentRss>http://ttwhy.org/home/blog/2010/01/31/c-for-programmers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Entanglement</title>
		<link>http://ttwhy.org/home/blog/2009/02/21/entanglement/</link>
		<comments>http://ttwhy.org/home/blog/2009/02/21/entanglement/#comments</comments>
		<pubDate>Sun, 22 Feb 2009 04:50:50 +0000</pubDate>
		<dc:creator>gyrm</dc:creator>
				<category><![CDATA[Code]]></category>

		<guid isPermaLink="false">http://ttwhy.org/home/blog/2009/02/21/entanglement/</guid>
		<description><![CDATA[Just wasted a good chunk of time on an issue I had using Grails &#8211; &#8220;deleted object would be re-saved by cascade&#8221;. Turns out that among the associations you need to remove to clear this error are the bi-directional associations created using belongsTo . I removed belongsTo from the domain object being removed from another [...]]]></description>
			<content:encoded><![CDATA[<p>Just wasted a good chunk of time on an issue I had using Grails &#8211; &#8220;deleted object would be re-saved by cascade&#8221;. Turns out that among the associations you need to remove to clear this error are the <strong>bi-directional associations created using <code>belongsTo</code></strong> . I removed <code>belongsTo</code> from the domain object being removed from another object&#8217;s list and deleted, problem solved! Incidentally the reverse link wasn&#8217;t necessary anyway.</p>
]]></content:encoded>
			<wfw:commentRss>http://ttwhy.org/home/blog/2009/02/21/entanglement/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Copy a Japanese-encoded FAT32 Volume</title>
		<link>http://ttwhy.org/home/blog/2008/12/13/mount-a-japanese-encoded-fat32-volume/</link>
		<comments>http://ttwhy.org/home/blog/2008/12/13/mount-a-japanese-encoded-fat32-volume/#comments</comments>
		<pubDate>Sat, 13 Dec 2008 21:02:13 +0000</pubDate>
		<dc:creator>gyrm</dc:creator>
				<category><![CDATA[Logistical]]></category>

		<guid isPermaLink="false">http://ttwhy.org/home/blog/2008/12/13/mount-a-japanese-encoded-fat32-volume/</guid>
		<description><![CDATA[I recently was asked by a friend to help transfer files from a defunct computer to his new laptop. It appeared at the outset this would be a trivial affair; however I soon ran into difficulties. The key issue was that the defunct computer was set up with the Japanese language edition of Windows XP, [...]]]></description>
			<content:encoded><![CDATA[<p>I recently was asked by a friend to help transfer files from a defunct computer to his new laptop. It appeared at the outset this would be a trivial affair; however I soon ran into difficulties. The key issue was that the defunct computer was set up with the Japanese language edition of Windows XP, with the filesystem formatted using FAT32, while the new system was an English language version of Windows Vista. </p>
<p>I soon entered a world of character code hurt &#8211; unbeknownst to me at the time, the filesystems of international editions of Windows are essentially incompatible with each other! Apparently, the set of supported filesystem character codes is fixed in each localized Windows kernel &#8211; short of installing Windows in that language, you will be unable to read any filesystems created using its character code!</p>
<p>Fortunately, Ubuntu comes to the rescue! Albeit not without some confusion and a healthy dose of wasted time. Here I outline the steps I took to copy the Japanese-encoded FAT32 filesystem content to an English Vista NTFS drive. You might be able to skip some of the steps, but I include them all for completeness.</p>
<ol>
<li>Connect the FAT32 drive to an Ubuntu box.</li>
<li>In a terminal, change to the superuser (we&#8217;ll need to be root for most steps): <code>sudo su</code></li>
<li>Mount the drive using the Japanese character code: <code>mount -o codepage=932,iocharset=utf8 -t vfat /dev/sdb1 /mnt/temp</code></li>
<li>Copy the drive contents to the local drive. (You might be able to skip this step by copying directly to the USB drive.) <code>cp -r /mnt/temp ~/backup</code></li>
<li>Did I say you needed a USB drive handy? Well, how else were you planning to transfer the files? We need to have an NTFS partition on the drive. I did this using GParted, so that I could have a FAT32 partition alongside an NTFS partition. GParted should be pretty straightforward to use &#8211; the only thing to note is that creating the initial partition tables will delete any existing data on the drive. We&#8217;ll also need NTFS write support. Install the following packages: <code>apt-get install gparted ntfs-3g ntfs-config ntfsprogs</code></li>
<li>Run <code>ntfs-config</code> . You can cancel out of the first dialog, but make sure &#8220;Enable write support for external device&#8221; is checked in the second dialog.</li>
<li>Install the Ubuntu Japanese language pack, if you haven&#8217;t already. In Interpid: <code>System &gt; Administration &gt; Language Support</code>, tick &#8220;Japanese&#8221; and hit &#8220;OK&#8221;.</li>
<li>Verify the locale was added: <code>locale -a | grep ja_JP</code></li>
<li>Set the <code>LANG</code> and </code>LANGUAGE</code> environment variables: <code>export LANG=\"ja_JP.utf8"</code>, then <code>export LANGUAGE=\"ja_JP.utf8"</code> .</li>
<li>Make sure the USB drive is not mounted. If it was automounted, for example on <code>/media</code>, unmount it: <code>umount /media/disk</code> . If the FAT32 drive is still mounted, you can unmount that too.</li>
<li>Mount the USB drive specifying a Japanese locale: <code>mount -o locale=ja_JP.utf8 /dev/sdf2 /mnt/temp</code></li>
<li>Copy the files from the local drive to the USB drive: <code>cp -r ~/backup /mnt/temp/</code></li>
<li>Unmount the USB drive and disconnect it from the Ubuntu box, reconnecting it to the Vista box.</li>
<li>In Vista, perform a simple file copy from the USB drive to the desired location.</li>
</ol>
<p>I hope this helps any poor souls out there put in the same situation as I was, for Japanese or any other multibyte language!</p>
]]></content:encoded>
			<wfw:commentRss>http://ttwhy.org/home/blog/2008/12/13/mount-a-japanese-encoded-fat32-volume/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Selenium is Groovy</title>
		<link>http://ttwhy.org/home/blog/2008/09/26/selenium-is-groovy/</link>
		<comments>http://ttwhy.org/home/blog/2008/09/26/selenium-is-groovy/#comments</comments>
		<pubDate>Sat, 27 Sep 2008 03:28:10 +0000</pubDate>
		<dc:creator>gyrm</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Selenium]]></category>

		<guid isPermaLink="false">http://ttwhy.org/home/blog/2008/09/26/selenium-is-groovy/</guid>
		<description><![CDATA[UI-Element has been integrated into Selenium Core in the project&#8217;s subversion repository for some time now. This means no special tricks are necessary to use it &#8211; just specify your map file as a user extension! I&#8217;m posting this announcement mainly because it seems my original UI-Element post is at the top of Google&#8217;s search [...]]]></description>
			<content:encoded><![CDATA[<p>UI-Element has been integrated into Selenium Core in the project&#8217;s subversion repository for some time now. This means no special tricks are necessary to use it &#8211; just specify your map file as a user extension! I&#8217;m posting this announcement mainly because it seems my original UI-Element post is at the top of Google&#8217;s search results, and I wanted to make clear that some things have changed significantly since it was published (but don&#8217;t want to rewrite the thing &#8230; you know, for posterity!).</p>
<p>Here&#8217;s the <a href="http://svn.openqa.org/fisheye/browse/~raw,r=trunk/selenium/trunk/src/main/resources/core/scripts/ui-doc.html">updated documentation link</a> (if it doesn&#8217;t move again).</p>
<p>In other news, there is now a Groovy formatter for Selenium IDE, and support for a special <code>GroovySeleneseTestCase</code> which makes it possible to merge <em>*AndWait</em> commands into single commands. For example:</p>
<pre class="code">
clickAndWait | foo
</pre>
<p>with the Java formatter translates into:</p>
<pre class="code">
selenium.click("foo");
selenium.waitForPageToLoad("30000");
</pre>
<p>while the Groovy formatter simply says:</p>
<pre class="code">
selenium.clickAndWait("foo")
</pre>
<p>Cleaner, and more expressive.</p>
]]></content:encoded>
			<wfw:commentRss>http://ttwhy.org/home/blog/2008/09/26/selenium-is-groovy/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Selenium RC Per-Session Extension Javascript</title>
		<link>http://ttwhy.org/home/blog/2008/05/14/selenium-rc-per-session-extension-javascript/</link>
		<comments>http://ttwhy.org/home/blog/2008/05/14/selenium-rc-per-session-extension-javascript/#comments</comments>
		<pubDate>Thu, 15 May 2008 00:46:24 +0000</pubDate>
		<dc:creator>gyrm</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Selenium]]></category>

		<guid isPermaLink="false">http://ttwhy.org/home/blog/2008/05/14/selenium-rc-per-session-extension-javascript/</guid>
		<description><![CDATA[Several people have asked if it is possible to specify user extension Javascript dynamically with the RC, as opposed to on the command line with the -userExtensions flag when starting up the server. It wasn&#8217;t possible before. It should be now. If you build from r2291 or greater from the RC trunk, you can play [...]]]></description>
			<content:encoded><![CDATA[<p>Several people have asked if it is possible to specify user extension Javascript dynamically with the RC, as opposed to on the command line with the <code>-userExtensions</code> flag when starting up the server. It wasn&#8217;t possible before.</p>
<p>It should be now.</p>
<p>If you build from r2291 or greater from the RC trunk, you can play with it. Basically, the extension Javascript must be specified before the browser is launched, and stays in-play until the session is closed. A sample test has been checked in here:</p>
<p><a href="http://svn.openqa.org/fisheye/browse/selenium-rc/trunk/tests/generated/src/test/java/com/thoughtworks/selenium/thirdparty/SessionExtensionJsTest.java?r=2365">SessionExtensionJsTest.java</a></p>
<p>This probably doesn&#8217;t work for proxy injection mode yet.</p>
<p>Happy extending!  <img src='http://ttwhy.org/home/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Update</strong></p>
<p>It appears too easy to encounter the &#8220;414 Request URI Too Large&#8221; issue. I&#8217;m looking into this.</p>
<p><strong>Update</strong></p>
<p>Looks like the 414 issue is related specifically to the Perl driver (see <a href="http://clearspace.openqa.org/message/43875">this Clearspace post</a>); I noticed it when using Perl, but did not see the issue when running an equivalent test in Groovy:</p>
<pre class="code">
import com.thoughtworks.selenium.*

class URILengthTest extends GroovyTestCase {
    def selenium

    @Override
    void setUp() {
        selenium = new DefaultSelenium('localhost',
            4444, '*firefox',
            'http://alistapart.com')
    }

    @Override
    void tearDown() {
        selenium.stop()
    }

    void testURILength() {
        def extensionJs = new File(
            'selenium-core/src/main/resources/core/scripts/ui-map-sample.js').text

        selenium.setExtensionJs(extensionJs)
        selenium.start()
        selenium.open('http://alistapart.com')
        selenium.click(
            'ui=allPages::section(section=topics)')
        selenium.waitForPageToLoad('5000')
    }
}
</pre>
<p><strong>Update</strong></p>
<p>Unfortunately, the 414 issue also affects the Python and Ruby client drivers (I just tested and verified this). I&#8217;m not about to fix them right this moment, so it appears the you can only truly take advantage of the per-session extension feature (i.e. include extensions of arbitrary size) in Java and Groovy for now.  <img src='http://ttwhy.org/home/blog/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' />   The good news is that this issue has already been reported, and JIRA tickets created (<a href="http://jira.openqa.org/browse/SRC-319">SRC-319</a> for Perl, <a href="http://jira.openqa.org/browse/SRC-321">SRC-321</a> for Python, <a href="http://jira.openqa.org/browse/SRC-322">SRC-322</a> for Ruby, and others for C# and PHP).</p>
]]></content:encoded>
			<wfw:commentRss>http://ttwhy.org/home/blog/2008/05/14/selenium-rc-per-session-extension-javascript/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
