<?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/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule">

<channel>
	<title>Objectify</title>
	<atom:link href="http://www.objectify.be/wordpress/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.objectify.be/wordpress</link>
	<description>vb. Giving reality to...</description>
	<lastBuildDate>Sun, 13 Jun 2010 18:03:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
<creativeCommons:license>http://creativecommons.org/licenses/by-nc/3.0/</creativeCommons:license>		<item>
		<title>Moving job, house and country using good engineering practices</title>
		<link>http://www.objectify.be/wordpress/?p=108</link>
		<comments>http://www.objectify.be/wordpress/?p=108#comments</comments>
		<pubDate>Sun, 13 Jun 2010 09:27:44 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[life]]></category>
		<category><![CDATA[good practice]]></category>
		<category><![CDATA[software engineering]]></category>

		<guid isPermaLink="false">http://www.objectify.be/wordpress/?p=108</guid>
		<description><![CDATA[Summer is almost here, the days are long and my good lady wife and I have decided to sell our house here in England and move over to Belgium (my wife is Belgian) for the rest of our lives. Some things that need to happen to enable this decision are a) moving house b) moving [...]]]></description>
			<content:encoded><![CDATA[<p>Summer is almost here, the days are long and my good lady wife and I have decided to sell our house here in England and move over to Belgium (my wife is Belgian) for the rest of our lives.</p>
<p>Some things that need to happen to enable this decision are<br />
a) moving house<br />
b) moving job<br />
c) moving contents of said house to another country</p>
<p>It has been said that moving house and changing jobs are two of the most stressful things you can do.  Throw in the international element, and the fact we have a three year old daughter, and this could potentially make us all a tad irritable.  While there&#8217;s no silver bullet for solving all the logistical issues that are going to arise, I think that using good software engineering practices can take the edge off.</p>
<p><strong>1. Co-ordination</strong><br />
What&#8217;s the best way for me to remember what needs doing?  What&#8217;s the best way to divide tasks logically between my wife and myself?  How can I keep track of what&#8217;s already been done?  </p>
<p>Important questions, and the answer is just the same as when working on a project &#8211; use good tools!  In this case, <a href="http://www.atlassian.com/software/jira/">Jira</a> is providing the heavy lifting &#8211; you can buy a 10-user license for US$10, and for that you can give yourself the ability to manage all the tasks for yourself and others from anywhere.  Projects and categories mean the work can be divided logically.  Works best if you have a server running at home you can expose to the internet.</p>
<p><strong>2. Small changes aggregate into big features</strong><br />
Or, to put it another way, use small boxes! Using big boxes may have the psychological benefit of clearing a lot of items from site, but they are<br />
a) heavy, possibly too heavy<br />
b) unwieldy<br />
c) not as flexible when it comes to transport or storage.</p>
<p>Small boxes, on the other hand, allow you to control the weight of the box more easily &#8211; a large box of books weighs a *lot*, and if you don&#8217;t throw your back out it&#8217;s still possible the contents will drop through the bottom when you pick it up!  Another psychological benefit is you fill more boxes more often, and it feels like you&#8217;re making real headway into the packing.</p>
<p>More importantly, small boxes allow you to&#8230;</p>
<p><strong>3. Release early, release often</strong><br />
Since we&#8217;re driving over to Belgium every couple of weeks for various reasons (looking at houses, job interviews&#8230;) it makes sense to take some of those small boxes with us, and leave them in a rented storage space (or friend&#8217;s garage).  This has the benefit of creating more working space in the house &#8211; boxes aren&#8217;t building up with no immediate place to go &#8211; and reducing the number of boxes we need to move over in one go on the big day.</p>
<p><strong>4. Constantly refactor</strong><br />
This is a good opportunity to locate things you no longer need, or items you have unnecessary multiples of, and get rid of them.  By starting early on the packing process, this gives you the opportunity to <a href="http://www.freecycle.org">freecycle</a> or sell things instead of just taking the down to the dump.</p>
<p><strong>Not an exact fit?</strong><br />
It&#8217;s impossible to make one discipline fit another exactly without a little massaging, but I think try to apply to activity A skills learned in activity B will often provide new ways of approaching a problem, or help to anticipate issues that haven&#8217;t yet arisen.  </p>
<p>I also think that software development provides a more useful model than most &#8211; I&#8217;ve tried to avoid really forcing the two together (&#8220;hey, let&#8217;s treat potential buyers as peer reviewers!&#8221;), but since we tend to blend a wide range of practices and have lots of shiny tools for managing work it&#8217;s easy to use engineering practices on major life-related projects. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.objectify.be/wordpress/?feed=rss2&amp;p=108</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Storing multiple object types in Java maps with type safety</title>
		<link>http://www.objectify.be/wordpress/?p=88</link>
		<comments>http://www.objectify.be/wordpress/?p=88#comments</comments>
		<pubDate>Wed, 21 Apr 2010 12:18:20 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[generics]]></category>
		<category><![CDATA[intellij]]></category>
		<category><![CDATA[maps]]></category>
		<category><![CDATA[typesafe]]></category>

		<guid isPermaLink="false">http://www.objectify.be/wordpress/?p=88</guid>
		<description><![CDATA[Java&#8217;s generics have undoubtedly made life easier in some cases by enforcing type safety on collections. One collection that frequently does not benefit from them is maps used in a heterogeneous way &#8211; that is, a java.util.Map (or equivalent) that contains several non-compatible values. Assuming the keys are of the same type, it&#8217;s still not [...]]]></description>
			<content:encoded><![CDATA[<p>Java&#8217;s generics have undoubtedly made life easier in some cases by enforcing type safety on collections.  One collection that frequently does not benefit from them is maps used in a heterogeneous way &#8211; that is, a java.util.Map (or equivalent) that contains several non-compatible values.  Assuming the keys are of the same type, it&#8217;s still not possible to type the value of the map as anything other than a java.lang.Object &#8211; exactly what it would have been prior to generics.</p>
<p>Looking through the <a href="http://www.jetbrains.com" target="_blank">Jetbrains</a> documentation on its API for <a href="http://www.jetbrains.net/devnet/thread/269493" target="_blank">IntelliJ plugin development</a>, it&#8217;s interesting to note their workaround for enforcing type safety in a map containing heterogeneous values:</p>
<ul>
<li><a href="http://git.jetbrains.org/?p=idea/community.git;a=blob_plain;f=platform/platform-api/src/com/intellij/openapi/actionSystem/DataKey.java" target="_blank">DataKey</a>&lt;T&gt; &#8211; the access point to the map</li>
<li><a href="http://git.jetbrains.org/?p=idea/community.git;a=blob;f=platform/platform-api/src/com/intellij/openapi/actionSystem/DataContext.java" target="_blank">DataContext</a> &#8211; an interface that can be used to wrap a map</li>
</ul>
<p>This approach externalises the type-safety of the map&#8217;s content by shifting the casts to DataKey.</p>
<p>The interesting part of DataKey, from this viewpoint, is</p>
<pre class="code">@Nullable
public T getData(@NotNull DataContext dataContext)
{
    return (T) dataContext.getData(myName);
}</pre>
<p>Read access is via the key, and not directly on the map itself, e.g. for a key</p>
<pre class="code">DataKey&lt;Foo&gt; FOO = DataKey.create("foo")</pre>
<p>a type-safe call without a cast can be made on the wrapped via:</p>
<pre class="code">Foo foo = MyKeys.FOO.getData(dataContext);</pre>
<p>The map-based implementations of DataContext just does a regular lookup with the key provided by DataKey:</p>
<pre class="code">public class MyDataContext implements DataContext
{
    private final Map&lt;String, ?&gt; data = new HashMap&lt;String, ?&gt;();
    @Nullable Object getData(@NonNls String dataId)
    {
        return data.get(dataId);
    }
}
</pre>
<p>and the returned object is cast to the correct type on the way out of DataKey.  Simple and elegant.</p>
<p>It&#8217;s worth noting that both DataKey and DataContext are read-only in function &#8211; there&#8217;s a getData(), but no setData().   It&#8217;s easy enough to extend the concept to make sure that what goes into the map is of the same type as what comes out by adding a couple of extra methods, one on DataKey:</p>
<pre class="code">    public void setData(DataContext dataContext, T value)
    {
        dataContext.setData(getName(), value);
    }
</pre>
<p>and another on DataContext:</p>
<pre class="code">    public void setData(String key, Object value)
    {
        data.put(key, value);
    }
</pre>
<p>I&#8217;ve seen a lot of code where keys to access values from maps have been declared as static final Strings.  Using DataKey, you could replace these declarations with DataKeys that specify the key to access the value and the type of the value itself, so</p>
<pre class="code">public static final String USER = "user";
...
User user = (User)map.get(USER);
</pre>
<p>would become</p>
<pre class="code">public static final DataKey&lt;User&gt; USER = DataKey.create("user");
...
User user = USER.getData(dataContext);
</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.objectify.be/wordpress/?feed=rss2&amp;p=88</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>It&#8217;s not me, it&#8217;s you</title>
		<link>http://www.objectify.be/wordpress/?p=81</link>
		<comments>http://www.objectify.be/wordpress/?p=81#comments</comments>
		<pubDate>Wed, 27 Jan 2010 19:08:59 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[general]]></category>
		<category><![CDATA[.me]]></category>
		<category><![CDATA[domain names]]></category>

		<guid isPermaLink="false">http://www.objectify.be/?p=81</guid>
		<description><![CDATA[Having recently been thinking about a new project, I started looking at available domains and was attracted to Macedonian .me domains as both useful and playful in what you work into them. Going to my usual domain registrar, I bought itsnotyouits.me (in retrospect, not the most memorable domain so I&#8217;m kind of glad things worked [...]]]></description>
			<content:encoded><![CDATA[<p>Having recently been thinking about a new project, I started looking at available domains and was attracted to Macedonian <a href="http://www.domain.be">.me</a> domains as both useful and playful in what you work into them.</p>
<p>Going to my usual domain registrar, I bought itsnotyouits.me (in retrospect, not the most memorable domain so I&#8217;m kind of glad things worked out as they did&#8230;) and waited a couple of days for the DNS change to propagate.  And a couple of days more, and then a couple more for good measure.  Regardless of how many times I checked my typing, every time I pointed my browser at the domain it didn&#8217;t go to a landing page &#8211; it couldn&#8217;t be resolved.</p>
<p>Checking the Macedonian domain register, I found the following message:</p>
<blockquote><p>The domain itsnotyouits.me is a Governmental Reserved Name and is available for registration only by eligible applicants.</p></blockquote>
<p>This wasn&#8217;t mentioned when I purchased the domain, but when I called the domain name registrar they said the registration had been refused (and by the way, we&#8217;ll get a refund out to you immediately).  Unless &#8220;It&#8217;s not you it&#8217;s&#8221; is Macedonian for Ministry of Defence, or maybe something unflattering about a prominent government figure, I can&#8217;t work out why it would be refused.  Indeed, various other predictable domain names with give-or-take four letters seem to have been happily sold.</p>
<p>Any ideas? </p>
]]></content:encoded>
			<wfw:commentRss>http://www.objectify.be/wordpress/?feed=rss2&amp;p=81</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adding arbitrary parameters to a URL in Struts2</title>
		<link>http://www.objectify.be/wordpress/?p=64</link>
		<comments>http://www.objectify.be/wordpress/?p=64#comments</comments>
		<pubDate>Mon, 09 Nov 2009 11:53:13 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[struts2]]></category>
		<category><![CDATA[param]]></category>
		<category><![CDATA[struts 2]]></category>
		<category><![CDATA[url]]></category>

		<guid isPermaLink="false">http://www.objectify.be/wordpress/?p=64</guid>
		<description><![CDATA[When building a Struts2 application recently, I needed to add arbitrary parameters to a URL when creating the menu from dynamic content. The parameters were stored in a map, so I used the my standard bit of code for iterating over a map: &#60;s:url var="url" action="%{link}" &#62;   &#60;s:iterator value="parameters.keySet()" var="key"&#62;     &#60;s:param name="%{key}" value="%{parameters.get(#key)}"/&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>When building a Struts2 application recently, I needed to add arbitrary parameters to a URL when creating the menu from dynamic content.  The parameters were stored in a map, so I used the my standard bit of code for iterating over a map:</p>
<pre class="code">
&lt;s:url var="url" action="%{link}" &gt;
  &lt;s:iterator value="parameters.keySet()" var="key"&gt;
    &lt;s:param name="%{key}" value="%{parameters.get(#key)}"/&gt;
  &lt;/s:iterator&gt;
&lt;/s:url&gt;</pre>
<p>&#8230;and nothing happened.  No parameters at all appeared in the URL.</p>
<p>Odd.</p>
<p>I got rid of the iterator and used a single parameter, just to check:</p>
<pre class="code">
&lt;s:url var="url" action="%{link}" &gt;
  &lt;s:param name="test-name" value="test-value"/&gt;
&lt;/s:url&gt;</pre>
<p>That worked fine.  One quick debugging session later and I found the problem &#8211; the Struts2 org.apache.struts2.components.Param component parameterises its parent component.  In this case, the parent component is an iterator and so it was absorbing the parameters and they were never getting as far as the URL.</p>
<p>I couldn&#8217;t find a way to do what I needed the core Struts2 components and tags and so I created my own.</p>
<p>IterableParam overrides Param&#8217;s findAncestor method to return the grandparent component in the case where the parent is an Iterator:</p>
<pre class="code">
&lt;s:url var="url" action="%{link}" &gt;
  &lt;s:iterator value="parameters.keySet()" var="key"&gt;
    &lt;ob:iterable-param name="%{key}" value="%{parameters.get(#key)}"/&gt;
  &lt;/s:iterator&gt;
&lt;/s:url&gt;</pre>
<p>Result &#8211; works as required.</p>
<p>Despite the title of this blog entry, any Struts2 component that can be parameterised using the &lt;s:param&gt; tag can be parameterised using &lt;ob:iterable-param&gt;.</p>
<p>You can get the new tag and component from </p>
<ul>
<li>binary: <a href="http://www.objectify.be/objectify-struts2/objectify-struts2-tags-1.0.jar">objectify-struts2-tags-1.0.jar</a></li>
<li>source: <a href="http://www.objectify.be/objectify-struts2/objectify-struts2-tags-1.0-src.zip">objectify-struts2-tags-1.0-src.zip</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.objectify.be/wordpress/?feed=rss2&amp;p=64</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>objectify-led 1.0 released</title>
		<link>http://www.objectify.be/wordpress/?p=55</link>
		<comments>http://www.objectify.be/wordpress/?p=55#comments</comments>
		<pubDate>Thu, 29 Oct 2009 23:32:49 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[java]]></category>
		<category><![CDATA[open source]]></category>
		<category><![CDATA[boilerplate]]></category>

		<guid isPermaLink="false">http://www.objectify.be/wordpress/?p=55</guid>
		<description><![CDATA[objectify-led, a Java library for binding properties at runtime has just been released at Objectify. Instead of having chunks of code such as public class Foo { private static String BLAH = "default-value"; private String myString; private int myInt = -1; public static void main(String[] args) { if (System.getProperty("blah.value) != null) { BLAH = System.getProperty("blah.value"); [...]]]></description>
			<content:encoded><![CDATA[<p>objectify-led, a Java library for binding properties at runtime has just been released at <a href="http://www.objectify.be" target="_blank">Objectify</a>.</p>
<p>Instead of having chunks of code such as</p>
<pre class="code">public class Foo
{
    private static String BLAH = "default-value";

    private String myString;

    private int myInt = -1;

    public static void main(String[] args)
    {
        if (System.getProperty("blah.value) != null)
        {
            BLAH = System.getProperty("blah.value");
        }

        Foo foo = new Foo();
        if (System.getProperty("mystring.value) != null)
        {
            foo.myString = System.getProperty("mystring.value");
        }
        if (System.getProperty("myint.value) != null)
        {
            try
            {
                String intValue = System.getProperty("myint.value");
                foo.myInt = Integer.parseInt(intValue;
            }
            catch (NumberFormatException e)
            {
                ...
            }
        }
    }
...
}</pre>
<p>you can instead use objectify-led to bind the properties for you :</p>
<pre class="code">public class Foo
{
    @Property("blah.value");
    private static String BLAH = "default-value";

    @Property("mystring.value");
    private String myString;

    @Property("myint.value");
    private int myInt = -1;

    public static void main(String[] args)
    {
        Foo foo = new Foo();
        new PropertySetter().process(foo);
    }
    ...
}</pre>
<p>By default, Strings and all primitive/wrapper classes are handled.  If you wish to convert a property value into a specific class, you just need to plug in your own object factory.</p>
<p>Additionally, the source of the properties is completely up to you.  By default, properties are taken from the system environment and any Properties objects you may have plugged in; custom property contexts can be used to provide a facade to more complex value stores.</p>
<p>Static values are handled in two ways. If an instance of a class is processed, both its instance and static members are populated if necessary.  If a class is processed, just the static members are populated (what with the lack of an instance and everything&#8230;).</p>
<p>Final properties- despite the ability to do so via reflection &#8211; are not set.  This may or may not change depending on feedback.</p>
<p>If you want to try out objectify-led, you can get the binaries and sources from the links below, or directly from <a href="http://www.objectify.be">http://www.objectify.be</a>.  They will be submitted to the well-known Maven repositories in the coming days.</p>
<p>Binaries:</p>
<ul>
<li><a href="http://objectify-led.googlecode.com/files/objectify-led-1.0.1.jar">objectify-led-1.0.1.jar</a></li>
<li><a href="http://objectify-led.googlecode.com/files/objectify-led-1.0.1-bin.zip">objectify-led-1.0.1-bin.zip</a></li>
<li><a href="http://objectify-led.googlecode.com/files/objectify-led-1.0.1-bin.tar.gz">objectify-led-1.0.1-bin.tar.gz</a></li>
</ul>
<p>Sources:</p>
<ul>
<li><a href="http://objectify-led.googlecode.com/files/objectify-led-1.0.1-src.zip">objectify-led-1.0.1-src.zip</a></li>
<li><a href="http://objectify-led.googlecode.com/files/objectify-led-1.0.1-src.tar.gz">objectify-led-1.0.1-src.tar.gz</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.objectify.be/wordpress/?feed=rss2&amp;p=55</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>IntelliJ IDEA now has a community edition</title>
		<link>http://www.objectify.be/wordpress/?p=51</link>
		<comments>http://www.objectify.be/wordpress/?p=51#comments</comments>
		<pubDate>Thu, 15 Oct 2009 23:17:12 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[general]]></category>

		<guid isPermaLink="false">http://www.objectify.be/wordpress/?p=51</guid>
		<description><![CDATA[In an annoucement earlier, Jetbrains announced a community version of IntelliJ IDEA. IntelliJ has long been my favourite IDE.  In fact, it&#8217;s the only IDE I&#8217;ve ever liked &#8211; having used Eclipse, Netbeans, VisualAge for Java, NetDynamics and I don&#8217;t know how many others, only IntelliJ has ever delivered what I&#8217;ve wanted. I personally belive [...]]]></description>
			<content:encoded><![CDATA[<p>In an <a title="IntelliJ IDEA goes open source" href="http://jetbrains.dzone.com/news/last-major-ide-vendor-intellij" target="_blank">annoucement</a> earlier, Jetbrains announced a community version of IntelliJ IDEA.</p>
<p>IntelliJ has long been my favourite IDE.  In fact, it&#8217;s the only IDE I&#8217;ve ever liked &#8211; having used Eclipse, Netbeans, VisualAge for Java, NetDynamics and I don&#8217;t know how many others, only IntelliJ has ever delivered what I&#8217;ve wanted.</p>
<p>I personally belive that Eclipse&#8217;s current position as the favoured IDE (based on a long-running poll on Facebook) has purely been down to two reasons &#8211; it&#8217;s free, and key generators for IntelliJ are hard to google.</p>
<p>I&#8217;m going to be watching the outcome of this with extreme interest, having advocated and defended IntelliJ against Eclipse for  the last 8 years.</p>
<p>A comparison of the difference between the community and commercial licenses are available <a title="Comparison between commercial and communuty IntelliJ editions" href="http://www.jetbrains.com/idea/nextversion/editions_comparison_matrix.html" target="_blank">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.objectify.be/wordpress/?feed=rss2&amp;p=51</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>10/GUI&#8217;s new concept for a desktop &#8211; how well would it work with a mouse?</title>
		<link>http://www.objectify.be/wordpress/?p=40</link>
		<comments>http://www.objectify.be/wordpress/?p=40#comments</comments>
		<pubDate>Thu, 15 Oct 2009 22:39:45 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[user interface design]]></category>

		<guid isPermaLink="false">http://www.objectify.be/wordpress/?p=40</guid>
		<description><![CDATA[I took a look at 10/GUI&#8216;s new desktop concept last night and was very impressed.      It&#8217;s always hard to break backwards compatibiliy, and when the place you&#8217;re going to be breaking it is the weakest link in the interaction chain &#8211; the user&#8217;s comfort zone.  However, it&#8217;s fair to say that comfort zone is [...]]]></description>
			<content:encoded><![CDATA[<p>I took a look at <a title="10/GUI" href="http://www.10gui.com" target="_blank">10/GUI</a>&#8216;s new desktop concept last night and was very impressed.      It&#8217;s always hard to break backwards compatibiliy, and when the place you&#8217;re going to be breaking it is the weakest link in the interaction chain &#8211; the user&#8217;s comfort zone.  However, it&#8217;s fair to say that comfort zone is already expanding in the case of a lot of casual users through the incorporation of multi-touch interfaces in some mobile phones (the iPhone springs to mind).</p>
<p style="text-align: center;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="506" height="352" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="loop" value="false" /><param name="quality" value="best" /><param name="src" value="http://vimeo.com/moogaloop.swf?clip_id=6712657&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" /><embed type="application/x-shockwave-flash" width="506" height="352" src="http://vimeo.com/moogaloop.swf?clip_id=6712657&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1" quality="best" loop="false"></embed></object></p>
<p style="text-align: left;">There are two distinct conceptual areas in the video &#8211; the multi-touch interface, and the Con10uum desktop environment itself.    They meld (apparently) seamlessy, but I started to wonder how easy it would be to separate them out in order to bring the benefits of the desktop design to those who won&#8217;t or can&#8217;t easily use dexterity as their primary input mechanism.  In the same way that some people have trouble using a mouse but are able to cope with a trackball, physical barriers to the use of some technology will always be present.</p>
<p style="text-align: left;">In order to think about how well Con10uum would interface with a mouse, the major constraint is the typical 2-button mouse.  The limited buttons mean that using one would require a gesture-heavy input style.  This is, of course, exactly what the multi-touch screen uses but the key difference it the multi-touch environment is very friendly to gestures; it&#8217;s easy to imagine pinch-zooming or scrolling with a sweep of a finger because the result is close to the physical gesture itself.  Gesturing using a mouse is very much an exercise in training the user to remember what does what.</p>
<p style="text-align: left;">Luckily, the mouse is at heart a device to move a pointer from point a,b to point x,y.  Buttons, scrollwheels, navigations buttons. etc are just gravy &#8211; well, one of those buttons isn&#8217;t gravy but the rest certainly are.  Accordingly, I think it&#8217;s fair game to choose, if not some tooled-up übermouse, then at least one with a clickable scrollwheel and two navigation buttons.  They fit ergonomically onto a well-designed mouse (some debate about the scrollwheel may be inserted here by sufferers of carpel tunnel syndrome) and exist in a mouse that you can just stroll down to your local hardware store and buy.</p>
<p style="text-align: left;">What, then, can these buttons and gestures be mapped to?</p>
<p style="text-align: left;">Con10uum has global and local &#8220;edges&#8221; defiend at the extreme left- and right-hand edges that are activated when a finger-press is detected in one.  This is nice and easy &#8211; let&#8217;s assume that if the mouse pointer hits either edge and remains there for 1 second the menu pops up (all times are subject to arguments, bar fights, etc).</p>
<p style="text-align: left;">Scrolling left/right across the workspace can be assigned to the navigation buttons &#8211; one click equals one window to the left/right as appropriate.  Holding down either navigation button while using the scroll wheel would drop to the thumbnail view of all open applications.</p>
<p style="text-align: left;">Zooming in and out is &#8211; yawn &#8211; a function of the scroll wheel.</p>
<p style="text-align: left;">Repositioning windows to the left/right is done by grabbing the title bar and gesturing sharply to the left/right (had to be a gesture in there somewhere!).</p>
<p style="text-align: left;">Expanding windows would be done by an expand-to-visible-area button that doesn&#8217;t appear in the video.  I think it could be worked in easily enough, given all the other comprises we&#8217;re making at this point <img src='http://www.objectify.be/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p style="text-align: left;">I personally think the Con10uum desktop has got some legs to it, and I wouldn&#8217;t be at all surprised to see someone knock up at the very least a prototype for Linux.  I think the multi-touch input device &#8211; powerful as it is &#8211; will take a while to achieve mass market popularity and therefore shouldn&#8217;t be forced to slow anything else down.</p>
<p style="text-align: left;">However this turns out, it&#8217;s going to be interesting.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.objectify.be/wordpress/?feed=rss2&amp;p=40</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The merge from hell</title>
		<link>http://www.objectify.be/wordpress/?p=29</link>
		<comments>http://www.objectify.be/wordpress/?p=29#comments</comments>
		<pubDate>Tue, 13 Oct 2009 19:57:55 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[fundamentals]]></category>
		<category><![CDATA[versioning]]></category>

		<guid isPermaLink="false">http://www.objectify.be/wordpress/?p=29</guid>
		<description><![CDATA[Having read my last post regarding version, you have no doubt jumped in your time machine, gone back a few years or months and implemented a sound versioning policy on all the projects you work on;  your colleagues think you are even more amazing than you were before, and life is generally coming up roses. [...]]]></description>
			<content:encoded><![CDATA[<p>Having read my last <a title="post" href="http://www.objectify.be/wordpress/?p=6" target="_blank"></a><a title="A rough overview of the basics of versioning" href="http://www.objectify.be/wordpress/?p=6" target="_blank">post</a> regarding version, you have no doubt jumped in your time machine, gone back a few years or months and implemented a sound versioning policy on all the projects you work on;  your colleagues think you are even more amazing than you were before, and life is generally coming up roses.</p>
<p>However, back in the present day a problem has presented itself.   While the code in the trunk has improved in leaps and bounds in terms of both high- and low-level architecture, features, modularisation, and to a lesser degree for this example, testing and documentation a parallel path of development has formed in one of the branches.</p>
<p>As previously discussed, branches are best used for fixing bugs in specific versions.  More than occasionally, a branch becomes the site of new development in order to cut out the overhead of migrating customers to newer versions &#8211; I&#8217;ve seen various reasons for this, but they&#8217;re of no importance as it&#8217;s the outcome that counts.</p>
<p>Depending on the timescale involved, and the amount of active development in both the trunk and the branch, the result may be two versions of the same project that are in essence both the latest version but are partially or totally incompatible with each other.</p>
<p>The problem can be alleviated to a greater or lesser degree by porting new features from the branch into the trunk.  If this is done diligently, this ceases to be a problem.  It&#8217;s still not a good situation to be in, but it is one less problem on your plate&#8230;for now, at least.</p>
<p>If porting doesn&#8217;t happen &#8211; due to perceived time contraints, difficulty in doing a quick port because of architectural changes, laziness, whatever &#8211; you&#8217;re heading into territory where the merge from hell lives.  Let&#8217;s take the example where a project which in the branch is a monolithic project built with Ant now exists in the trunk as a modular Mavenized project which has been refactored to the nth degree to improve many aspects; we now have two incompatible codebases that require reconciling.</p>
<p>There are a few approachs that can be taken here.  The brute force approach is to examine the branch compared to the trunk to build up a profile of files that have been added or removed.  You can finesse this process a little by comparing the branch to the trunk at the time of branching to get some addition information &#8211; but any major strucural changes to the trunk (like that described above) will negate this.  Once you&#8217;ve compiled your exhaustive list of files that have been added, removed or updated you can go through and copy each file from the trunk to the branch &#8211; ensuring in the process that you&#8217;re not introducing any bugs, incorrect assumptions, duplicate functionality, etc.  Also, make sure that you&#8217;re matching the new architecture and coding guidelines if you don&#8217;t want a rap on the knuckles from the other developers.</p>
<p>Another approach is to merge at the functional level, in other words port the features but not necessarily the code.  This may feel like a counter-intuitive approach given the features already exist in perfectly good code <em>just over there</em>, but digging those features out of the branch could well be as intensive &#8211; and probably a hell of a lot more frustrating &#8211; than implementing them afresh in the the trunk.</p>
<p>If all this seems like a lot of hard work &#8211; it is.  It&#8217;s far better to never get into this situation in the first place, but we live and work in a world where things have not always been as pragmatically optimised as we would like.  As we move towards cleaner, better tested and architecturally sound projects there are occasionally a few pit stops along the way.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.objectify.be/wordpress/?feed=rss2&amp;p=29</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A rough overview of the basics of versioning</title>
		<link>http://www.objectify.be/wordpress/?p=6</link>
		<comments>http://www.objectify.be/wordpress/?p=6#comments</comments>
		<pubDate>Tue, 06 Oct 2009 23:29:27 +0000</pubDate>
		<dc:creator>steve</dc:creator>
				<category><![CDATA[fundamentals]]></category>
		<category><![CDATA[versioning]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svn]]></category>

		<guid isPermaLink="false">http://www.objectify.be/wordpress/?p=6</guid>
		<description><![CDATA[Why use version control? Versioning is a crucial key of the development process for several reasons best described through the lack of versioning: Want to see a great piece of code that was refactored out, deleted or otherwise lost six months ago? Hmm&#8230; If you have multiple versions of a product used in live environments [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Why use version control?</strong></p>
<p>Versioning is a crucial key of the development process for several reasons best described through the lack of versioning:</p>
<ol>
<li>Want to see a great piece of code that was refactored out, deleted or otherwise lost six months ago?  Hmm&#8230;</li>
<li>If you have multiple versions of a product used in live environments (by customers or yourself), how are you able to provide any form of bug-fixing without upgrading to the most recent version?</li>
<li>Want to experiment with a new architecture, build system, unit test library or general-purpose doomahickey without risking your current setup?  Tough.</li>
<li>Is your code full of commented-out chunks that are kept around just in case?  That&#8217;s poor man&#8217;s versioning!</li>
<li>And a whole bunch of other reasons that I&#8217;ll probably remember as soon as I hit the publish button.</li>
</ol>
<p>The most basic &#8211; and naive &#8211; form of versioning if simply to take a copy of the codebase every so often and place it somewhere safe.   This is better than nothing, but it would require logic to be convoluted at Olympic level to persuade anyone it&#8217;s a reasonable approach; it smacks of the wrong kind of laziness &#8211; zero effort up front, and sustained effort for minimal gain on the back end.</p>
<p>Skipping over the part where a company decides the best solution is to develop an in-house versioning system, we can move directly to tried-and-tested version control systems (VCSs).  Many exist, both free and commercial, and whichever you decide will generally make your life easier.</p>
<p>In this particular example, I will use Subversion (<a href="http://subversion.tigris.org/" target="_blank">http://subversion.tigris.org</a>) , a.k.a. svn- a popular, well-established VCS system that enjoys support from the command line, and various continuous integration servers and IDEs.</p>
<p><strong>Versioning with Subversion</strong></p>
<p>At the core of the user interaction possible, Subversion works on a system of checkouts, commits and updates.  A quick definition:</p>
<ul>
<li>repository &#8211; a collection of versioned files within the svn server</li>
<li>checkout &#8211; the process by which the versioned files, plus some svn-specific information, are copied from the svn server to a working copy (e.g. on your local computer, or on a continuous integration server)</li>
<li>commit &#8211; an atomic operation where all the files added, removed or updated in the working copy are propagated back to the svn server.</li>
<li>update &#8211; synchronizes the files of the working copy with those of the svn server.  This is used to pull the results of commits other than your own into your working copy.  Your own commits, by definition, are already in your working copy because that&#8217;s where you made the changes.</li>
</ul>
<p>A typical project lifecycle in an imaginary world would be</p>
<p>1. Create project in subversion</p>
<p>2. Create or import the initial files</p>
<p>3..n-1. Commit and update files as you and other committers make changes to the repository</p>
<p>n. End of project</p>
<p>Anyone who has ever got to <em>n</em>, break out the champagne and take a five-minute break &#8211; you&#8217;ve either shipped the definitive (not to mention bug-free) version of the project, or you&#8217;ve just been downsized.  Nonetheless, this illustrates versioning with a single branch with no tags.  Each commit can be traced to a specific committer, and the development history of the project is kept for both posterity and code audits.</p>
<p><strong>Branches?  Tags?</strong></p>
<p>As mentioned above, versioning can be done in a linear fashion &#8211; one single line, with commits falling exclusively on that line.  In svn terminology, this line is called the trunk.</p>
<div id="attachment_19" class="wp-caption aligncenter" style="width: 143px"><img class="size-full wp-image-19" title="trunk-only" src="http://www.objectify.be/wordpress/wp-content/uploads/2009/10/trunk-only.png" alt="Versioning using the trunk only" width="133" height="291" /><p class="wp-caption-text">Versioning using the trunk only</p></div>
<p>A project that has multiple versions, however, needs to consider branching.  Branching, just as the name suggests, represents a major offshoot of the trunk.  In fact, it&#8217;s an exact copy of the trunk at the point the branching took place.  We now have, in effect, two parallel lines of development which are completely independent but have a common root.</p>
<p>The branch may represent, for example, the point at which version 1.1 was released.  The trunk would be branched into, say, MyApp-1.1, built, tested and shipped.  At roughly the same time as this, the person sitting opposite you just committed a major change that won&#8217;t be available until version 1.2 &#8211; this commit does not affect the 1.1 code, and so ongoing developments in the trunk do not corrupt bug-fixing endeavours in the 1.1 branch.</p>
<p>A more realistic development cycle would be</p>
<p>trunk.1 -  Create project in subversion</p>
<p>trunk.n..trunk.n-1 -  Commit and update files as you and other committers make changes to the repository</p>
<p>trunk.n &#8211; Branch code as new customer comes on board and makes various requests</p>
<p>trunk.n+1 &#8211; Continue working on new features, requirements, etc, no effect is felt by the branch.  Any bug discovered which also exists in the branch may have its fix ported into the branch.</p>
<p>branch.n.1 &#8211; Bug fixes, no effect is felt by the trunk.  Any bug discovered which also exists in the trunk may have its fix ported into the trunk.</p>
<div id="attachment_27" class="wp-caption aligncenter" style="width: 571px"><img class="size-full wp-image-27" title="branch-and-tag" src="http://www.objectify.be/wordpress/wp-content/uploads/2009/10/branch-and-tag.png" alt="A repository with branches and tags" width="561" height="546" /><p class="wp-caption-text">A repository with branches and tags</p></div>
<p>When certain points are reached, for example when all the requirements are have been met, tags come into play.  A tag is a snapshot of the branch at a given point, and is useful for recalling the state of the project at a given point.  Tags should be used, at the very least, for each release;  they may also be used, for example, for internal tracking.</p>
<p><strong>So you can only have one branch?</strong></p>
<p>So far, the examples have centered around the trunk and a single branch.  This is fine for illustrative purposes, but remember that not only are multiple branches possible, it&#8217;s also possible to branch from branches.  In fact, you can think of the trunk as a branch with the only difference being it doesn&#8217;t have a parent.</p>
<p><strong>Why version when the binaries tell the whole truth and nothing but the truth?</strong></p>
<p>Pragmatism and laziness are, at the end of the day, two of the greatest attributes any developer can have.  They lead to automation, efficient processes and a tendency to get things right in the minimum amount of time.  Taking this into account, surely adding version control to your project is an unnecessary overhead?  After all, the binaries held by the customer not only fit their reqiurements but also contain exactly the bug that requires fixing!  The binaries can be requested from the customer,  decompiled, patched, recompiled and redistributed.  Easy as pie, sweet as a pea, etc, etc.</p>
<p>If you&#8217;re going to take this route, you have to ask the customer for their binaries each and every time you have to fix a bug for them.  There is, of course, the possibility that you&#8217;ll keep a copy of each binary you send to them to avoid this unprofessional and embarrasing request&#8230;but if you&#8217;re going to do that, why not just version the source code in the first place?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.objectify.be/wordpress/?feed=rss2&amp;p=6</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
