<?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>Benji's Blog</title>
	<atom:link href="http://benjiweber.co.uk/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://benjiweber.co.uk/blog</link>
	<description></description>
	<lastBuildDate>Fri, 18 Sep 2009 16:39:33 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>openSUSE conference &#8211; Software Portal Talk</title>
		<link>http://benjiweber.co.uk/blog/2009/09/18/opensuse-conference-software-portal-talk/</link>
		<comments>http://benjiweber.co.uk/blog/2009/09/18/opensuse-conference-software-portal-talk/#comments</comments>
		<pubDate>Fri, 18 Sep 2009 16:39:33 +0000</pubDate>
		<dc:creator>benji</dc:creator>
				<category><![CDATA[openSUSE]]></category>

		<guid isPermaLink="false">http://benjiweber.co.uk/blog/?p=97</guid>
		<description><![CDATA[
Here are my notes from the software portal talk Pascal and I gave yesterday at the openSUSE conference.
The slides we used are also available.
What is the Software Portal?


Software Portal is a free-software web-application that runs as a service on on opensuse-community.org. It provides both a web-ui and an API. It is possible you are already [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://files.benjiweber.co.uk/swp.pdf" onclick="javascript:pageTracker._trackPageview('/downloadsfiles.benjiweber./swp.pdf');"><img src="http://files.benjiweber.co.uk/swptalk/slide_title.png"/></a></p>
<p>Here are my notes from the software portal talk Pascal and I gave yesterday at the openSUSE conference.</p>
<p><a href="http://files.benjiweber.co.uk/swp.pdf" onclick="javascript:pageTracker._trackPageview('/downloadsfiles.benjiweber./swp.pdf');">The slides we used are also available.</a></p>
<h2>What is the Software Portal?</h2>
<p><img src="http://files.benjiweber.co.uk/swptalk/slide_what.png"/></p>
<p>
Software Portal is a free-software web-application that runs as a service on on <a href="http://software.opensuse-community.org" onclick="javascript:pageTracker._trackPageview('/outbound/article/software.opensuse-community.org');">opensuse-community.org</a>. It provides both a web-ui and an API. It is possible you are already using the software portal if you use the <a href="http://packages.opensuse-community.org" onclick="javascript:pageTracker._trackPageview('/outbound/article/packages.opensuse-community.org');">webpin search page</a> or the <a href="http://dev-loki.blogspot.com/2007/07/webpin-command-line-client.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/dev-loki.blogspot.com');">command line webpin programme written by Pascal</a>. For the last few months this has been backing on to the software portal.
</p>
<p>
The software portal indexes package repositories, both those discoverable with the openSUSE build service API and those users add manually through the web interface. It also allows users to contribute additional metadata such as ratings, comments, tags, and screenshots. These two sources of information are both associated against &#8220;applications&#8221;. The web user-interface is primarily a way of finding, installing, and adding information about applications.
</p>
<h2>Applications </h2>
<p><img src="http://files.benjiweber.co.uk/swptalk/slide_application.png"/></p>
<p>
So, what is an application? We define applications within software portal to be a higher level concept than packages. Applications are what users perceive software as &#8211; A product they are looking for and may wish to install to perform a task. Packages are the mechanism of how applications are distributed to users. Packages are platform-specific, they require different packages for different operating systems, and different architectures. The split between packages is also defined by pragmatic issues related to distribution more than conceptual boundaries. Some applications may require multiple packages installed in order to use. Conversely some packages contain more than one application. For example the application GIMP on openSUSE on a 32bit platform might consist of the main gimp package, a gimp-banding package, and some core plugins in another package. Another opposite example is the kdenetwork3 package that contains multiple chat applications.
</p>
<p>
The web-ui provides application-level search, tag-browsing, and installation.
</p>
<p>
In the software portal we strive to map packages to the appropriate applications. There are three mechanisms we currently use to do this:
</p>
<ol>
<li>A set of rules stored in the database that map common package naming conventions to application names.</li>
<p>
	For example: currently kde4 applications tend to have the packagename kde4-packagename. Many non-desktop specific packages start with the application name. Rules are assigned priorities so that more-specific rules can override general rules.</p>
<li>The presence of .desktop files in packages.</li>
<li>User-defined mappings.</li>
<p>
	Through the web-ui, users can define additional applications and edit existing applications. While editing, users can define rules for which source-packages should be mapped to which applications during repository indexing. </p>
</ol>
<p>
One of the main aims of abstracting away from packages to applications is that we want to allow users to just click install at an application level, without having to know what their hardware/software platform is or choose which package vendor to use. To this end we need some way to choose a preferred vendor for each application in the case where there are multiple vendors of that application. We do this by
</p>
<ol>
<li>Associating a priority with repositories based upon their support status and stable/experimental status.</li>
<p>	So the highest priority would be the update and static distribution repositories, and the lowest would be random home: repositories in the openSUSE build service.</p>
<li>Allowing power-users to customise the preferred vendor and selection of binary packages to install by default for an application. Via the web-ui.</li>
</ol>
<p>
 The operating system agnosticism is provided by one-click-install and the system package management can choose the appropriate architecture packages.
</p>
<h2>Why is it needed?</h2>
<p><img src="http://files.benjiweber.co.uk/swptalk/slide_why.png"/></p>
<p>
openSUSE embraces third party vendors of packages. Which means that there&#8217;s a low barrier to entry and anyone can start packaging and publishing software to users. However, this freedom leads to a confusing situation for users.
</p>
<h4>Many repositories </h4>
<p>
	(Software Portal is currently indexing around 4000 and this is not exhaustive.)
</p>
<h4>Package duplication.</h4>
<p>
	Some applications such as amarok has been packaged dozens of times for openSUSE by different people for various reasons. In this case how does a user choose which vendor to choose? We also encourage duplication by not making it easy to find existing packages.
</p>
<h4>Lack of user-feedback</h4>
<p>One packager may package dozens of packages but may not extensively use many of them. We&#8217;re not currently good at collecting feedback of package and software quality from users. It&#8217;s also not clear for users where to file bugs for the software they&#8217;ve just installed. </p>
<h4>Confusing concepts</h4>
<p>
	It should not be necessary for users to understand concepts such as packages and package repositories just to install software. It&#8217;s also unnecessary for users to know what operating system (version) they&#8217;re running or on what hardware.</p>
<h4>Insufficient data</h4>
<p>We currently rely heavily upon a few package maintainers to source and supply metadata for packages. Packages come with descriptions and summaries but lack more rich metadata such as screenshots. There are many more end users than packagers so it makes sense to let them contribute this information.</p>
<h2>Implementation Platform </h2>
<p><img src="http://files.benjiweber.co.uk/swptalk/slide_architecture.png"/></p>
<p>
Software portal project is implemented using Java 6, making heavy use of Spring Framework, Apache Wicket, Jersey, Maven, and MySQL.
</p>
<h2> Future Plans</h2>
<p>
We are currently working on finalising a &#8220;1.0&#8243; release, fixing some of the major bugs, performance issues, and polishing the user interface to get to the point that it is safe for end users to start using and we can publicise it. We need help right now in testing and finding bugs.
</p>
<p>The biggest performance issues I am currently working on are:</p>
<ul>
<li>Search of all 20+ million unique file names every time someone performs a search. </li>
<li>Calculation of the best binary packages to install for applications with dozens of different vendors.</li>
</ul>
<p>
Challenges arise from the frequency of change of the package repositories (thousands of packages may change every day). Index formats are a balance between query performance and update performance.
</p>
<p>
After first release one of the biggest issues we want to resolve is that people cannot use their existing login that they use for all other openSUSE services to log into the software portal. Due to Novell control of the authentication system. We have a dependency on Novell here, but hope to implement openID support and that Novell will be able to implement an openID provider.
</p>
<p>Further ahead we would like to work on things like:</p>
<h4>A recommendation engine </h4>
<p>
	We could do things like recommend you plugins for software you have installed.
</p>
<h4>User-specific search. </h4>
<p>When we know information about the user, their preferences, and what operating system they have installed we can tailor search results to match them, prioritise applications that are available for their platform, and give higher priority to applications for their preferred desktop.</p>
<h4>Translation</h4>
<p>
	The web-ui is already translatable. Application descriptions are stored in a translatable manner but the source of this information (package repositories) generally does not have translations. We could potentially build an interface to allow people to translate the content itself if there were a demand for it.</p>
<h4>Use Build-Service remoting or Hermes notification framework</h4>
<p>
Move towards a push model where the software portal is notified of new software, rather than the current pull system where we have to poll package repositories to see if they&#8217;re changed, then compute the differences from the previous version if they have.</p>
<h4>Integration with bugzilla</h4>
<p>
Report bugs directly from software portal.
</p>
<h4>Integration with upstream</h4>
<p>Perhaps via the DOAP (Description of a Project) format. We could both consume DOAP files provided by upstream projects, and expose DOAP for software we have indexed.</p>
<h2>The Master Plan</h2>
<p>
Our original aim was to supplement the web-service with a rich desktop client that utilises the information indexed by the software portal and combines that with information available to it as an application running on the local system, such as the currently installed packages, and the repositories the user subscribes to.
</p>
<p>
Perhaps a YaST module? We already have a package-search yast module that does use the software-portal API to search for packages, but much more powerful things are possible. Unfortunately we do not currently have the time to work on a desktop client on top of the web app itself so if anyone is interested in working on this side of things please get in touch.
</p>
<h2>Demo</h2>
<p>
We gave a demonstration of some of the features mentioned above during our talk. <a href="http://software.opensuse-community.org" onclick="javascript:pageTracker._trackPageview('/outbound/article/software.opensuse-community.org');">You can play with the current version online</a>. Though please be aware there are lots of known bugs and performance issues, it&#8217;s not ready for end-users yet.
</p>
<p>
That said, please do play with it, and let us know what&#8217;s broken by <a href="http://bugzilla.novell.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/bugzilla.novell.com');">filing bugs</a> under the openSUSE.org->Software Portal bug component.
</p>
<p>
If you want to try out more of the administrator features such as adding repositories, adding applications, customising package to application mapping etc then create an account and <a href="mailto:benji [a t] openSUSE [d o t] org">drop me an email</a> so I can grant you permissions.
</p>
<h2>How can you help?</h2>
<ul>
<li>Start testing it</li>
<li>File bug reports</li>
<li>Help create and organise content</li>
<li>Developers who know Java and want to contribute code would be welcome. We would be happy to help people get started with the codebase.</li>
<li>Designers can help us improve the look and feel and interaction. Some of the processes such as mapping packages to applications are somewhat klunky. It would be good to get some suggestions on how to make this functionality easier to use.
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://benjiweber.co.uk/blog/2009/09/18/opensuse-conference-software-portal-talk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Switzerland</title>
		<link>http://benjiweber.co.uk/blog/2009/08/16/switzerland/</link>
		<comments>http://benjiweber.co.uk/blog/2009/08/16/switzerland/#comments</comments>
		<pubDate>Sun, 16 Aug 2009 16:30:57 +0000</pubDate>
		<dc:creator>benji</dc:creator>
				<category><![CDATA[Holiday]]></category>
		<category><![CDATA[Cycling]]></category>
		<category><![CDATA[Switzerland]]></category>

		<guid isPermaLink="false">http://benjiweber.co.uk/blog/?p=82</guid>
		<description><![CDATA[I got back this week from holiday cycling and walking in Switzerland. I cycled down from Basel in the north via Bern and Interlaken to Fiescheralp. Then back via Luzern and Zürich.
Fiescheralp is next to the beautiful Aletsch Glacier

I stayed in a chalet here for a few days with family and did some climbing and [...]]]></description>
			<content:encoded><![CDATA[<p>I got back this week from holiday cycling and walking in Switzerland. I cycled down from Basel in the north via Bern and Interlaken to Fiescheralp. Then back via Luzern and Zürich.</p>
<p>Fiescheralp is next to the beautiful <a href="http://en.wikipedia.org/wiki/Aletsch_Glacier" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.wikipedia.org');">Aletsch Glacier</a></p>
<p><a href="http://files.benjiweber.co.uk/b/switzerland/Glacier_Path_Small.jpg" ><img src="http://files.benjiweber.co.uk/b/switzerland/Glacier_Path_Small.jpg" alt="Aletsch Glacier" /></a></p>
<p>I stayed in a chalet here for a few days with family and did some <a href="http://www.eggishorn.ch/jwa/de/sommer/klettersteig.jsp" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.eggishorn.ch');">climbing</a> and walking</p>
<p><a href="http://files.benjiweber.co.uk/b/switzerland/Ridge.jpg"><br />
<h4>Eggishorn to Bettmerhorn</h4>
<p><img src="http://files.benjiweber.co.uk/b/switzerland/Ridge_Small.jpg" alt="Eggishorn to Bettmerhorn" /></a></p>
<p><a href="http://files.benjiweber.co.uk/b/switzerland/GrimselPass_Sign.jpg" ><img src="http://files.benjiweber.co.uk/b/switzerland/GrimselPass_Sign_Small.jpg" alt="" style="float:left; margin-right: 10px;" /></a></p>
<p>The highlight of the trip was cycling through the mountains. Especially Grimselpass. </p>
<div style="clear:both; line-height:0px;">&nbsp;</div>
<p><a href="http://files.benjiweber.co.uk/b/switzerland/GrimselPass_Asscent.jpg"><br />
<h4>GrimselPass from Gletch</h4>
<p><img src="http://files.benjiweber.co.uk/b/switzerland/GrimselPass_Asscent_Small.jpg" alt="GrimselPass From Gletch" /></a></p>
<p><a href="http://files.benjiweber.co.uk/b/switzerland/GrimselPass_Top.jpg"><br />
<h4>GrimselPass Towards Meiringen</h4>
<p><img src="http://files.benjiweber.co.uk/b/switzerland/GrimselPass_Top_Small.jpg" alt="GrimselPass Towards Meiringen" /></a></p>
<p><a href="http://files.benjiweber.co.uk/b/switzerland/Brienz_Light.jpg"><br />
<h4>Brienz</h4>
<p><img src="http://files.benjiweber.co.uk/b/switzerland/Brienz_Light_Small.jpg" alt="Brienz" /></a></p>
<p><a href="http://files.benjiweber.co.uk/b/switzerland/Brunigpass.jpg"><br />
<h4>Brunigpass</h4>
<p><img src="http://files.benjiweber.co.uk/b/switzerland/Brunigpass_Small.jpg" alt="Brunigpass" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://benjiweber.co.uk/blog/2009/08/16/switzerland/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java Abuse &#8211; Currency Pattern</title>
		<link>http://benjiweber.co.uk/blog/2009/06/18/java-abuse-currency-pattern/</link>
		<comments>http://benjiweber.co.uk/blog/2009/06/18/java-abuse-currency-pattern/#comments</comments>
		<pubDate>Thu, 18 Jun 2009 17:26:12 +0000</pubDate>
		<dc:creator>benji</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://benjiweber.co.uk/blog/?p=72</guid>
		<description><![CDATA[Here&#8217;s a sillier one from last night&#8230;
People often complain about not being able to return multiple values from a method in Java. I can&#8217;t see a good reason for wanting to do this, but some do.
The example I was given was wanting to do:

int foo, bar, baz; list&#40;foo, bar, bar&#41; = func&#40;ponies&#41;;

Where func(ponies) returns 3 [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a sillier one from last night&#8230;</p>
<p>People <a href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4222792" onclick="javascript:pageTracker._trackPageview('/outbound/article/bugs.sun.com');">often</a> <a href="http://www.javalobby.org/java/forums/t104018.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.javalobby.org');">complain</a> about not being able to return multiple values from a method in Java. I can&#8217;t see a good reason for wanting to do this, but some do.</p>
<p>The example I was given was wanting to do:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000066; font-weight: bold;">int</span> foo, bar, baz<span style="color: #339933;">;</span> list<span style="color: #009900;">&#40;</span>foo, bar, bar<span style="color: #009900;">&#41;</span> <span style="color: #339933;">=</span> func<span style="color: #009900;">&#40;</span>ponies<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Where func(ponies) returns 3 values which are then assigned to the local variables foo, bar, and baz.</p>
<p>There are plenty of sensible ways of achieving this, but what if we&#8217;re trying to get as close as possible to the above method? We can only return one thing from a method, but that could be a chain. We also can&#8217;t modify the local foo,bar,baz from inside the list method, but we could if we wrap them in references.</p>
<p>If we abuse the fact that <a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Character.html#isJavaLetter(char)" onclick="javascript:pageTracker._trackPageview('/outbound/article/java.sun.com');">currency characters are valid identifiers in Java</a>, for the ultimate in unreadability; We can use $(x,y) to be a pair of x and y, $$ to terminate a list, and £(x) to either reference or dereference x.</p>
<p>Then we can do something like this ¬_¬</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #008000; font-style: italic; font-weight: bold;">/** OUTPUT
Foo = 1
Bar = 2
Bingo = Badgers
Baz = 3
**/</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">package</span> <span style="color: #006699;">scratchpad</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">static</span> scratchpad.$.$<span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">static</span> scratchpad.$$.$$<span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">static</span> scratchpad.$.<span style="color: #006633;">expand</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">static</span> scratchpad.£.£<span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> MultipleReturn
<span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span>... <span style="color: #006633;">args</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">new</span> MultipleReturn<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">demo</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> demo<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		£<span style="color: #339933;">&lt;</span>Integer<span style="color: #339933;">&gt;</span> foo <span style="color: #339933;">=</span> £<span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span>1<span style="color: #009900;">&#41;</span>, bar <span style="color: #339933;">=</span> £<span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span>1<span style="color: #009900;">&#41;</span>, baz <span style="color: #339933;">=</span> £<span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span>1<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		£<span style="color: #339933;">&lt;</span>String<span style="color: #339933;">&gt;</span> bingo <span style="color: #339933;">=</span> £<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		expand<span style="color: #009900;">&#40;</span>foo<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">into</span><span style="color: #009900;">&#40;</span>foo,bar,bingo,baz<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
		<span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Foo = &quot;</span> <span style="color: #339933;">+</span> £<span style="color: #009900;">&#40;</span>foo<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Bar = &quot;</span> <span style="color: #339933;">+</span> £<span style="color: #009900;">&#40;</span>bar<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Bingo = &quot;</span> <span style="color: #339933;">+</span> £<span style="color: #009900;">&#40;</span>bingo<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Baz = &quot;</span> <span style="color: #339933;">+</span> £<span style="color: #009900;">&#40;</span>baz<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> $<span style="color: #339933;">&lt;</span>Integer,$<span style="color: #339933;">&lt;</span>Integer,$<span style="color: #339933;">&lt;</span>String,$<span style="color: #339933;">&lt;</span>Integer,$$<span style="color: #339933;">&gt;&gt;&gt;&gt;</span> foo<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">return</span> $<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">1</span>,$<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">2</span>,$<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;Badgers&quot;</span>,$<span style="color: #009900;">&#40;</span>3,$$<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">interface</span> Tuple <span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> $$ <span style="color: #000000; font-weight: bold;">implements</span> Tuple
<span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">private</span> $$<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> <span style="color: #009900;">&#125;</span>
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> $$ $$ <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> $$<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> $<span style="color: #339933;">&lt;</span>T,U <span style="color: #000000; font-weight: bold;">extends</span> Tuple<span style="color: #339933;">&gt;</span> <span style="color: #000000; font-weight: bold;">implements</span> Tuple
<span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">public</span> T _1<span style="color: #339933;">;</span>
	<span style="color: #000000; font-weight: bold;">public</span> U _2<span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">protected</span> $<span style="color: #009900;">&#40;</span>T t,U u<span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">this</span>._1 <span style="color: #339933;">=</span> t<span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">this</span>._2 <span style="color: #339933;">=</span> u<span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #339933;">&lt;</span>T<span style="color: #339933;">&gt;</span> $<span style="color: #339933;">&lt;</span>T,$$<span style="color: #339933;">&gt;</span> $<span style="color: #009900;">&#40;</span>T t<span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000000; font-weight: bold;">new</span> $<span style="color: #339933;">&lt;</span>T,$$<span style="color: #339933;">&gt;</span><span style="color: #009900;">&#40;</span>t,$$<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #339933;">&lt;</span>T,U <span style="color: #000000; font-weight: bold;">extends</span> Tuple<span style="color: #339933;">&gt;</span> $<span style="color: #339933;">&lt;</span>T,U<span style="color: #339933;">&gt;</span> $<span style="color: #009900;">&#40;</span>T t, U u<span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000000; font-weight: bold;">new</span> $<span style="color: #339933;">&lt;</span>T,U<span style="color: #339933;">&gt;</span><span style="color: #009900;">&#40;</span>t,u<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">interface</span> Expander
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> into<span style="color: #009900;">&#40;</span>£... <span style="color: #006633;">refs</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> Expander expand<span style="color: #009900;">&#40;</span><span style="color: #000000; font-weight: bold;">final</span> $<span style="color: #339933;">&lt;?</span>,<span style="color: #339933;">?</span> <span style="color: #000000; font-weight: bold;">extends</span> Tuple<span style="color: #339933;">&gt;</span> vals<span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000000; font-weight: bold;">new</span> Expander<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> into<span style="color: #009900;">&#40;</span>scratchpad.£... <span style="color: #006633;">refs</span><span style="color: #009900;">&#41;</span>
			<span style="color: #009900;">&#123;</span>
				<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>refs.<span style="color: #006633;">length</span> <span style="color: #339933;">&lt;</span> 1<span style="color: #009900;">&#41;</span>
					<span style="color: #000000; font-weight: bold;">return</span><span style="color: #339933;">;</span>
&nbsp;
				$ current <span style="color: #339933;">=</span> vals<span style="color: #339933;">;</span>
				refs<span style="color: #009900;">&#91;</span>0<span style="color: #009900;">&#93;</span>._1 <span style="color: #339933;">=</span> current._1<span style="color: #339933;">;</span>
				<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>current._2 <span style="color: #000000; font-weight: bold;">instanceof</span> $$<span style="color: #009900;">&#41;</span>
					<span style="color: #000000; font-weight: bold;">return</span><span style="color: #339933;">;</span>
				<span style="color: #000066; font-weight: bold;">int</span> i <span style="color: #339933;">=</span> <span style="color: #cc66cc;">1</span><span style="color: #339933;">;</span>
				<span style="color: #000000; font-weight: bold;">while</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #009900;">&#40;</span>current._2 <span style="color: #000000; font-weight: bold;">instanceof</span> $$<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
				<span style="color: #009900;">&#123;</span>
					<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>i <span style="color: #339933;">&gt;=</span> refs.<span style="color: #006633;">length</span><span style="color: #009900;">&#41;</span>
						<span style="color: #000000; font-weight: bold;">return</span><span style="color: #339933;">;</span>
					current <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>$<span style="color: #009900;">&#41;</span>current._2<span style="color: #339933;">;</span>
					refs<span style="color: #009900;">&#91;</span>i<span style="color: #009900;">&#93;</span>._1 <span style="color: #339933;">=</span> current._1<span style="color: #339933;">;</span>
					i<span style="color: #339933;">++;</span>
				<span style="color: #009900;">&#125;</span>
			<span style="color: #009900;">&#125;</span>
&nbsp;
		<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> £<span style="color: #339933;">&lt;</span>T<span style="color: #339933;">&gt;</span> <span style="color: #000000; font-weight: bold;">extends</span> $<span style="color: #339933;">&lt;</span>T,$$<span style="color: #339933;">&gt;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">protected</span> £<span style="color: #009900;">&#40;</span>T t<span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">super</span><span style="color: #009900;">&#40;</span>t,$$<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #339933;">&lt;</span>T<span style="color: #339933;">&gt;</span> £<span style="color: #339933;">&lt;</span>T<span style="color: #339933;">&gt;</span> £<span style="color: #009900;">&#40;</span>T t<span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000000; font-weight: bold;">new</span> £<span style="color: #339933;">&lt;</span>T<span style="color: #339933;">&gt;</span><span style="color: #009900;">&#40;</span>t<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #339933;">&lt;</span>T<span style="color: #339933;">&gt;</span> T £<span style="color: #009900;">&#40;</span>£<span style="color: #339933;">&lt;</span>T<span style="color: #339933;">&gt;</span> t<span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">return</span> t._1<span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://benjiweber.co.uk/blog/2009/06/18/java-abuse-currency-pattern/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Java Abuse &#8211; Ternary Try/Catch</title>
		<link>http://benjiweber.co.uk/blog/2009/06/14/java-abuse-ternary-trycatch/</link>
		<comments>http://benjiweber.co.uk/blog/2009/06/14/java-abuse-ternary-trycatch/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 13:03:27 +0000</pubDate>
		<dc:creator>benji</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://benjiweber.co.uk/blog/?p=46</guid>
		<description><![CDATA[We often discuss Java limitations on IRC and try to come up with (sometimes silly) workarounds. Unfortunately after time passes it&#8217;s often easy to forget the outcome, and lose code snippets. So I thought I&#8217;d start blogging some of them so I don&#8217;t lose them, and other people might suggest other ways of doing things [...]]]></description>
			<content:encoded><![CDATA[<p>We often discuss Java limitations on IRC and try to come up with (sometimes silly) workarounds. Unfortunately after time passes it&#8217;s often easy to forget the outcome, and lose code snippets. So I thought I&#8217;d start blogging some of them so I don&#8217;t lose them, and other people might suggest other ways of doing things that we&#8217;ve overlooked.</p>
<p>This particular problem occurs when you want to assign the result of a method that can throw an exception to a final variable. For example:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">final</span> Customer c<span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">try</span>
<span style="color: #009900;">&#123;</span>
	c <span style="color: #339933;">=</span> getCustomer<span style="color: #009900;">&#40;</span>id<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span>CustomerNotFoundException e<span style="color: #009900;">&#41;</span>
<span style="color: #009900;">&#123;</span>
	c <span style="color: #339933;">=</span> createNewCustomer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>This will fail to compile with &#8220;variable c might already have been assigned&#8221;. Of course making c not final would solve the problem, but that&#8217;s no fun.</p>
<p>If we were not using Exceptions, Java provides a useful ternary operator &#8220;?:&#8221; that lets us do things like:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">final</span> Customer c <span style="color: #339933;">=</span> customerExists<span style="color: #009900;">&#40;</span>id<span style="color: #009900;">&#41;</span> <span style="color: #339933;">?</span> getCustomer<span style="color: #009900;">&#40;</span>id<span style="color: #009900;">&#41;</span> <span style="color: #339933;">:</span> createNewCustomer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Which is nice and clean, but means that getCustomer is going to have to return null or throw a RuntimeException in the case that there is no matching customer, which is undesirable. Also  customerExists() may be expensive.</p>
<p>We could also possibly use something along the lines of</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">final</span> Option<span style="color: #339933;">&lt;</span>Customer<span style="color: #339933;">&gt;</span> c <span style="color: #339933;">=</span> getCustomer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Both of these alternatives, however, require changing the API you&#8217;re consuming, and avoiding Exceptions. It would be nice if there was an equivalent of &#8220;?:&#8221; for try/catch so that you could assign the result to a final variable. The best I can manage in Java is below, can anyone do better?</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">java.lang.reflect.ParameterizedType</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">abstract</span> <span style="color: #000000; font-weight: bold;">class</span> TryCatch<span style="color: #339933;">&lt;</span>T, U <span style="color: #000000; font-weight: bold;">extends</span> Exception<span style="color: #339933;">&gt;</span>
<span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">public</span> T value<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">try</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000000; font-weight: bold;">Try</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
		<span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">catch</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">Exception</span> e<span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>getTypeOfU<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">isAssignableFrom</span><span style="color: #009900;">&#40;</span>e.<span style="color: #006633;">getClass</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
			<span style="color: #009900;">&#123;</span>
				<span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000000; font-weight: bold;">Catch</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span> <span style="color: #000000; font-weight: bold;">else</span>
			<span style="color: #009900;">&#123;</span>
				<span style="color: #000000; font-weight: bold;">throw</span> <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #003399;">RuntimeException</span><span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	@SuppressWarnings<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;unchecked&quot;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #000000; font-weight: bold;">private</span> Class<span style="color: #339933;">&lt;</span>U<span style="color: #339933;">&gt;</span> getTypeOfU<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">return</span> <span style="color: #009900;">&#40;</span>Class<span style="color: #339933;">&lt;</span>U<span style="color: #339933;">&gt;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#40;</span>ParameterizedType<span style="color: #009900;">&#41;</span> getClass<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getGenericSuperclass</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>.<span style="color: #006633;">getActualTypeArguments</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#91;</span>1<span style="color: #009900;">&#93;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">abstract</span> T <span style="color: #000000; font-weight: bold;">Try</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> U<span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">abstract</span> T <span style="color: #000000; font-weight: bold;">Catch</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">//Example</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Main
<span style="color: #009900;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">static</span> CustomerRepo repo <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> CustomerRepo<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">static</span> <span style="color: #000066; font-weight: bold;">void</span> main<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span><span style="color: #009900;">&#91;</span><span style="color: #009900;">&#93;</span> args<span style="color: #009900;">&#41;</span> 
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">final</span> Customer c <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> TryCatch<span style="color: #339933;">&lt;</span>Customer, CustomerNotFoundException<span style="color: #339933;">&gt;</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
		<span style="color: #009900;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">public</span> Customer <span style="color: #000000; font-weight: bold;">Try</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> CustomerNotFoundException
			<span style="color: #009900;">&#123;</span>
				<span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;in try&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #000000; font-weight: bold;">return</span> repo.<span style="color: #006633;">getCustomer</span><span style="color: #009900;">&#40;</span>1<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
&nbsp;
			<span style="color: #000000; font-weight: bold;">public</span> Customer <span style="color: #000000; font-weight: bold;">Catch</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
			<span style="color: #009900;">&#123;</span>
				<span style="color: #003399;">System</span>.<span style="color: #006633;">out</span>.<span style="color: #006633;">println</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;in catch&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
				<span style="color: #000000; font-weight: bold;">return</span> repo.<span style="color: #006633;">createCustomer</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
			<span style="color: #009900;">&#125;</span>
		<span style="color: #009900;">&#125;</span>.<span style="color: #006633;">value</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> CustomerRepo
<span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> Customer getCustomer<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> id<span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">throws</span> CustomerNotFoundException
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">throw</span> <span style="color: #000000; font-weight: bold;">new</span> CustomerNotFoundException<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">public</span> Customer createCustomer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span>
	<span style="color: #009900;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">return</span> <span style="color: #000000; font-weight: bold;">new</span> Customer<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> Customer
<span style="color: #009900;">&#123;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">class</span> CustomerNotFoundException <span style="color: #000000; font-weight: bold;">extends</span> <span style="color: #003399;">Exception</span>
<span style="color: #009900;">&#123;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>In C# we don&#8217;t run into the same problem since <a href="http://msdn.microsoft.com/en-us/library/acdd6hb7.aspx" onclick="javascript:pageTracker._trackPageview('/outbound/article/msdn.microsoft.com');">readonly</a> is much less useful than Java&#8217;s <a href="http://mindprod.com/jgloss/final.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/mindprod.com');">final</a>. However, if we wanted to try/catch at the same time we can do a bit better. Here&#8217;s an alternative in C#:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">using</span> <span style="color: #008080;">System</span><span style="color: #008000;">;</span>
&nbsp;
<span style="color: #0600FF;">public</span> <span style="color: #FF0000;">class</span> Example
<span style="color: #000000;">&#123;</span>
	<span style="color: #0600FF;">public</span> <span style="color: #0600FF;">static</span> <span style="color: #0600FF;">void</span> Main<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
	<span style="color: #000000;">&#123;</span>
		Example t <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> Example<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
		t.<span style="color: #0000FF;">Foo</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
	<span style="color: #000000;">&#125;</span>
&nbsp;
	<span style="color: #0600FF;">public</span> <span style="color: #0600FF;">void</span> Foo<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>
	<span style="color: #000000;">&#123;</span>
		<span style="color: #FF0000;">String</span> result1 <span style="color: #008000;">=</span> <span style="color: #0600FF;">this</span>.<span style="color: #0600FF;">Try</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">=&gt;</span> GetBar<span style="color: #000000;">&#40;</span><span style="color: #0600FF;">true</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>.<span style="color: #0600FF;">Catch</span><span style="color: #008000;">&lt;</span>BarException<span style="color: #008000;">&gt;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">=&gt;</span> <span style="color: #666666;">&quot;Caught a BarException&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
		<span style="color: #FF0000;">String</span> result2 <span style="color: #008000;">=</span> <span style="color: #0600FF;">this</span>.<span style="color: #0600FF;">Try</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">=&gt;</span> GetBar<span style="color: #000000;">&#40;</span><span style="color: #0600FF;">false</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>.<span style="color: #0600FF;">Catch</span><span style="color: #008000;">&lt;</span>BarException<span style="color: #008000;">&gt;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">=&gt;</span> <span style="color: #666666;">&quot;Caught a BarException&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
		Console.<span style="color: #0000FF;">WriteLine</span><span style="color: #000000;">&#40;</span>result1<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
		Console.<span style="color: #0000FF;">WriteLine</span><span style="color: #000000;">&#40;</span>result2<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
	<span style="color: #000000;">&#125;</span>
&nbsp;
	<span style="color: #0600FF;">public</span> <span style="color: #FF0000;">String</span> GetBar<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">bool</span> succeed<span style="color: #000000;">&#41;</span>
	<span style="color: #000000;">&#123;</span>
		<span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>succeed<span style="color: #000000;">&#41;</span>
			<span style="color: #0600FF;">return</span> <span style="color: #666666;">&quot;Success!&quot;</span><span style="color: #008000;">;</span>
		<span style="color: #0600FF;">else</span>
			<span style="color: #0600FF;">throw</span> <span style="color: #008000;">new</span> BarException<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0600FF;">public</span> <span style="color: #FF0000;">class</span> BarException <span style="color: #008000;">:</span> Exception <span style="color: #000000;">&#123;</span><span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0600FF;">public</span> <span style="color: #FF0000;">class</span> Tryer<span style="color: #008000;">&lt;</span>TResult<span style="color: #008000;">&gt;</span>
<span style="color: #000000;">&#123;</span>
	<span style="color: #0600FF;">private</span> <span style="color: #0600FF;">readonly</span> Func<span style="color: #008000;">&lt;</span>TResult<span style="color: #008000;">&gt;</span> toTry<span style="color: #008000;">;</span>
	<span style="color: #0600FF;">internal</span> Tryer<span style="color: #000000;">&#40;</span>Func<span style="color: #008000;">&lt;</span>TResult<span style="color: #008000;">&gt;</span> toTry<span style="color: #000000;">&#41;</span>
	<span style="color: #000000;">&#123;</span>
		<span style="color: #0600FF;">this</span>.<span style="color: #0000FF;">toTry</span> <span style="color: #008000;">=</span> toTry<span style="color: #008000;">;</span>
	<span style="color: #000000;">&#125;</span>
&nbsp;
	<span style="color: #0600FF;">public</span> TResult <span style="color: #0600FF;">Catch</span><span style="color: #008000;">&lt;</span>TException<span style="color: #008000;">&gt;</span><span style="color: #000000;">&#40;</span>Func<span style="color: #008000;">&lt;</span>TResult<span style="color: #008000;">&gt;</span> whenCaught<span style="color: #000000;">&#41;</span>
		where TException <span style="color: #008000;">:</span> Exception
	<span style="color: #000000;">&#123;</span>
		<span style="color: #0600FF;">try</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #0600FF;">return</span> toTry<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
		<span style="color: #000000;">&#125;</span> <span style="color: #0600FF;">catch</span> <span style="color: #000000;">&#40;</span>TException<span style="color: #000000;">&#41;</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #0600FF;">return</span> whenCaught<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
		<span style="color: #000000;">&#125;</span>
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0600FF;">namespace</span> <span style="color: #000000;">System</span>
<span style="color: #000000;">&#123;</span>
	<span style="color: #0600FF;">public</span> <span style="color: #0600FF;">static</span> <span style="color: #FF0000;">class</span> ProvidesTry
	<span style="color: #000000;">&#123;</span>
		<span style="color: #0600FF;">public</span> <span style="color: #0600FF;">static</span> Tryer<span style="color: #008000;">&lt;</span>TResult<span style="color: #008000;">&gt;</span> <span style="color: #0600FF;">Try</span><span style="color: #008000;">&lt;</span>T,TResult<span style="color: #008000;">&gt;</span><span style="color: #000000;">&#40;</span><span style="color: #0600FF;">this</span> T other, Func<span style="color: #008000;">&lt;</span>TResult<span style="color: #008000;">&gt;</span> toTry<span style="color: #000000;">&#41;</span>
		<span style="color: #000000;">&#123;</span>
			<span style="color: #0600FF;">return</span> <span style="color: #008000;">new</span> Tryer<span style="color: #008000;">&lt;</span>TResult<span style="color: #008000;">&gt;</span><span style="color: #000000;">&#40;</span>toTry<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
		<span style="color: #000000;">&#125;</span> 
	<span style="color: #000000;">&#125;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://benjiweber.co.uk/blog/2009/06/14/java-abuse-ternary-trycatch/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Software Portal Preview Available.</title>
		<link>http://benjiweber.co.uk/blog/2009/02/02/software-portal-preview-available/</link>
		<comments>http://benjiweber.co.uk/blog/2009/02/02/software-portal-preview-available/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 22:59:35 +0000</pubDate>
		<dc:creator>benji</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://benjiweber.co.uk/blog/?p=34</guid>
		<description><![CDATA[In the last couple of weeks I&#8217;ve had some time to work on the software portal project for the first time for a while.
There is now a test snapshot that you can play with if you wish, and help find bugs.
Please do have a play and leave comments here or file a bug report under [...]]]></description>
			<content:encoded><![CDATA[<p>In the last couple of weeks I&#8217;ve had some time to work on the <a href="http://en.opensuse.org/Software_Portal" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.opensuse.org');">software portal</a> project for the first time for a while.</p>
<p>There is now a <a href="http://softwareportal-test.opensuse-community.org" onclick="javascript:pageTracker._trackPageview('/outbound/article/softwareportal-test.opensuse-community.org');">test snapshot</a> that you can play with if you wish, and help find bugs.</p>
<p>Please do <a href="http://softwareportal-test.opensuse-community.org" onclick="javascript:pageTracker._trackPageview('/outbound/article/softwareportal-test.opensuse-community.org');">have a play</a> and leave comments here or <a href="http://bugzilla.novell.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/bugzilla.novell.com');">file a bug report</a> under the <a href="http://bw.uwcs.co.uk/b/swp/swp_bug_report.png" >Software Portal</a> component.</p>
<p>You&#8217;ll need to <a href="http://softwareportal-test.opensuse-community.org/web/user/register" onclick="javascript:pageTracker._trackPageview('/outbound/article/softwareportal-test.opensuse-community.org');">register</a> to add comments/screenshots/tags etc. Unfortunately since the account you use to login to other openSUSE.org services is controlled by Novell and they provide no openid/saml facility you cannot use the same user account. If you want permissions to edit application details just send me an email (benji at opensuse dot org).</p>
<p>Most of the recent work has been under the hood. Significant speed improvements to the repository indexer and a Webpin compatible webservice that will enable the <a href="http://dev-loki.blogspot.com/2007/07/webpin-command-line-client.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/dev-loki.blogspot.com');">various</a> <a href="http://hedgehogpainter.livejournal.com/4686.html" onclick="javascript:pageTracker._trackPageview('/outbound/article/hedgehogpainter.livejournal.com');">clients</a> to continue to work against software portal as they did with webpin until they can be ported to the new api.</p>
<p>There are also some visible changes. The homepage now displays recent comments &amp; top rated applications, and includes the tag cloud.</p>
<p><a href="http://bw.uwcs.co.uk/b/swp/swp_home.png" ><img src="http://bw.uwcs.co.uk/b/swp/swp_home_small.png" alt="Software Portal Home Page" /></a></p>
<p>Users can now choose a specific vendor for an application for their distribution, as well as installing from the preferred vendor.</p>
<p><a href="http://bw.uwcs.co.uk/b/swp/swp_view_vendors.png" ><img src="http://bw.uwcs.co.uk/b/swp/swp_view_vendors_small.png" alt="" /></a></p>
<p>Editors can now customise which source packages map to which application.</p>
<p><a href="http://bw.uwcs.co.uk/b/swp/swp_edit_source_packages.png" ><img src="http://bw.uwcs.co.uk/b/swp/swp_edit_source_packages_small.png" alt="" /></a></p>
<p>and which binary packages should be installed by default when a user clicks install.</p>
<p><a href="http://bw.uwcs.co.uk/b/swp/swp_edit_ymp.png" ><img src="http://bw.uwcs.co.uk/b/swp/swp_edit_ymp_small.png" alt="" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://benjiweber.co.uk/blog/2009/02/02/software-portal-preview-available/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Snow</title>
		<link>http://benjiweber.co.uk/blog/2009/02/02/snow/</link>
		<comments>http://benjiweber.co.uk/blog/2009/02/02/snow/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 22:04:42 +0000</pubDate>
		<dc:creator>benji</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://benjiweber.co.uk/blog/?p=27</guid>
		<description><![CDATA[This morning we had an unusual amount of snow here, more than we&#8217;ve had in my lifetime. Most public transport was suspended and the people attempting to drive were quickly getting stuck and sliding all over the place.
Motorists were making the classic motorist error. They&#8217;ve got too much power. I&#8217;ve got half a horsepower on [...]]]></description>
			<content:encoded><![CDATA[<p>This morning we had an unusual amount of snow here, more than we&#8217;ve had in my lifetime. Most public transport was suspended and the people attempting to drive were quickly getting stuck and sliding all over the place.</p>
<p>Motorists were making the classic motorist error. They&#8217;ve got too much power. I&#8217;ve got half a horsepower on this &#8211; you don&#8217;t want any more than that on snow.</p>
<p><a href="http://files.benjiweber.co.uk/b/snow1.jpg" ><img src="http://files.benjiweber.co.uk/b/snow1_small.jpg" alt="" /></a></p>
<p><a href="http://files.benjiweber.co.uk/b/snow3.jpg" ><img src="http://files.benjiweber.co.uk/b/snow3_small.jpg" alt="" /></a></p>
<p>Even Boris Johnson mayor of London <a href="http://news.bbc.co.uk/1/hi/uk/7865169.stm" >apparently cycled to work today</a>.</p>
<p>Also see <a href="http://www.yehudamoon.com/index.php?date=2009-01-21" onclick="javascript:pageTracker._trackPageview('/outbound/article/www.yehudamoon.com');">this comic.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://benjiweber.co.uk/blog/2009/02/02/snow/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>openSUSE IRC &#8211; Mailing list &amp; Bot</title>
		<link>http://benjiweber.co.uk/blog/2008/09/02/opensuse-irc-mailing-list-bot/</link>
		<comments>http://benjiweber.co.uk/blog/2008/09/02/opensuse-irc-mailing-list-bot/#comments</comments>
		<pubDate>Tue, 02 Sep 2008 22:16:27 +0000</pubDate>
		<dc:creator>benji</dc:creator>
				<category><![CDATA[openSUSE]]></category>
		<category><![CDATA[IRC]]></category>

		<guid isPermaLink="false">http://benjiweber.co.uk/wordpress/?p=15</guid>
		<description><![CDATA[There is a new mailing list for operators on the openSUSE IRC channels &#8211; ircops at opensuse dot org. 
If you have any queries, suggestions, or complaints regarding an openSUSE IRC channel, please email the list, supplying relevant log excerpts.
For reference, the IRC rules are located on the opensuse-community wiki..
If you are an operator on [...]]]></description>
			<content:encoded><![CDATA[<p>There is a new mailing list for operators on the openSUSE IRC channels &#8211; ircops at opensuse dot org. </p>
<p>If you have any queries, suggestions, or complaints regarding an openSUSE IRC channel, please email the list, supplying relevant log excerpts.</p>
<p>For reference, the IRC rules are located on <a href="http://opensuse-community.org/IRC_Rules" onclick="javascript:pageTracker._trackPageview('/outbound/article/opensuse-community.org');">the opensuse-community wiki.</a>.</p>
<p>If you are an operator on any openSUSE IRC channel, and have not yet done so &#8211; please join the list. The method of subscribing is the same as for <a href="http://en.opensuse.org/Mailing_Lists#Subscribing" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.opensuse.org');">any other openSUSE mailing list.</a></p>
<p>In other IRC related news, the SUSEhelp bot sitting in many openSUSE channels has for some time now supported localisable factoids. Some channels are already using this to provide localised answers to queries such as &#8220;SUSEhelp: mp3&#8243; and &#8220;SUSEhelp: kde4&#8243;. If you help in a non-English IRC channel and would find this useful feel free to ask me (<a href="irc://irc.freenode.org/benJIman" onclick="javascript:pageTracker._trackPageview('/outbound/article/irc.freenode.org');">benJIman on freenode</a>) how to use it.</p>
]]></content:encoded>
			<wfw:commentRss>http://benjiweber.co.uk/blog/2008/09/02/opensuse-irc-mailing-list-bot/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hackweek &#8211; Software Portal</title>
		<link>http://benjiweber.co.uk/blog/2008/09/02/hackweek-software-portal/</link>
		<comments>http://benjiweber.co.uk/blog/2008/09/02/hackweek-software-portal/#comments</comments>
		<pubDate>Tue, 02 Sep 2008 22:16:20 +0000</pubDate>
		<dc:creator>benji</dc:creator>
				<category><![CDATA[openSUSE]]></category>
		<category><![CDATA[swp]]></category>

		<guid isPermaLink="false">http://benjiweber.co.uk/wordpress/?p=10</guid>
		<description><![CDATA[Most of the time that I was able to spend actually hacking during hackweek I spent working on the software portal. It was very helpful to be able to discuss issues with Pascal in person.
The software portal project aims to expose the software available for openSUSE and other linux distributions to users as &#8220;Applications&#8221; rather [...]]]></description>
			<content:encoded><![CDATA[<p>Most of the time that I was able to spend actually hacking during hackweek I spent working on the <a href="http://en.opensuse.org/Software_Portal" onclick="javascript:pageTracker._trackPageview('/outbound/article/en.opensuse.org');">software portal</a>. It was very helpful to be able to discuss issues with <a href="http://dev-loki.blogspot.com" onclick="javascript:pageTracker._trackPageview('/outbound/article/dev-loki.blogspot.com');">Pascal</a> in person.</p>
<p>The software portal project aims to expose the software available for openSUSE and other linux distributions to users as &#8220;Applications&#8221; rather than &#8220;Packages&#8221;. The differences between applications and packages are:</p>
<ul>
<li> Applications can be made up of more than one package. e.g. Amarok is split into several packages on openSUSE.</li>
<li> There can be several applications in one package. e.g. kdenetwork3 contains both kget and feedbrowser on openSUSE.</li>
<li>Applications are not tied to a particular distribution. </li>
</ul>
<p>The idea is that the user can locate available software by searching or browsing then add screenshots, comments, ratings, tags, translations, etc. The user should also be able to install an application he/she has found without having to know what operating system he/she is running.</p>
<p>Software Portal automates the import of package information from package repositories (rpm-md,deb) and in the future other sources. The import process also maps packages to applications automatically based on the available package metadata a process that can be refined and guided with rules.</p>
<p><img src="http://files.benjiweber.co.uk/swp/swp_simple.png" alt="Package information is imported from package repositories and mapped to applications. Users can also contribute to applications."/></p>
<p>I spent quite some time working on providing a mechanism for users to guide how the repository indexer maps packages to applications, which is quite crucial to allow users to add their own applications and specify which packages make up the application.</p>
<p>I was also very pleased to achieve the goal I set myself before hackweek &#8211; to get an instance of the software portal running on a server where people could access it and test it. This has already led to many defects being found and some fixed. I will not publish the URL publicly yet as there are still major problems to fix, we are breaking it fairly regularly, and having lots of people playing with it at this stage would cause problems. Hopefully we can make a test version publicly available before too long.</p>
<p>Some current screenshots:</p>
<p><a href="http://files.benjiweber.co.uk/swp/front_page.png" ><img src="http://files.benjiweber.co.uk/swp/front_page_small.png" alt="Software Portal Front Page" /></a><br />
<a href="http://files.benjiweber.co.uk/swp/list_applications.png" ><img src="http://files.benjiweber.co.uk/swp/list_applications_small.png" alt="Listing applications" /></a><br />
<a href="http://files.benjiweber.co.uk/swp/view_application.png" ><img src="http://files.benjiweber.co.uk/swp/view_application_small.png" alt="Viewing an application" /></a></p>
<p><a href="http://files.benjiweber.co.uk/swp" >More screenshots are available.</a></p>
<p>At present there are only two people working on the software portal project. If you are interested in helping either with java development, or with web design, or in any other area, please do join <a href="http://forge.novell.com/mailman/listinfo/appinstaller-devel" onclick="javascript:pageTracker._trackPageview('/outbound/article/forge.novell.com');">our mailing list</a>, or drop into <a href="irc://irc.freenode.net/#opensuse-project" onclick="javascript:pageTracker._trackPageview('/outbound/article/irc.freenode.net');">#opensuse-project on freenode</a> with any questions.</p>
]]></content:encoded>
			<wfw:commentRss>http://benjiweber.co.uk/blog/2008/09/02/hackweek-software-portal/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Hackweek Summary &amp; New Blog</title>
		<link>http://benjiweber.co.uk/blog/2008/09/02/hackweek-summary-new-blog/</link>
		<comments>http://benjiweber.co.uk/blog/2008/09/02/hackweek-summary-new-blog/#comments</comments>
		<pubDate>Tue, 02 Sep 2008 22:16:07 +0000</pubDate>
		<dc:creator>benji</dc:creator>
				<category><![CDATA[openSUSE]]></category>
		<category><![CDATA[Hackweek]]></category>

		<guid isPermaLink="false">http://benjiweber.co.uk/wordpress/?p=12</guid>
		<description><![CDATA[Having now left the University of Warwick, I have lost access to my Warwick hosted blog. So I will now be hosting it myself at http://benjiweber.co.uk/blog.
Last week was hackweek at Novell &#8211; during which Novell developers get to work full time on their own personal projects. Novell were kind enough to sponsor several openSUSE community [...]]]></description>
			<content:encoded><![CDATA[<p>Having now left the <a href="http://warwick.ac.uk" onclick="javascript:pageTracker._trackPageview('/outbound/article/warwick.ac.uk');">University of Warwick</a>, I have lost access to my <a href="http://blogs.warwick.ac.uk/bweber" onclick="javascript:pageTracker._trackPageview('/outbound/article/blogs.warwick.ac.uk');">Warwick hosted blog</a>. So I will now be hosting it myself at <a href="http://benjiweber.co.uk/blog" >http://benjiweber.co.uk/blog</a>.</p>
<p>Last week was hackweek at Novell &#8211; during which Novell developers get to work full time on their own personal projects. Novell were kind enough to sponsor several openSUSE community members (including myself) to travel to <a href="http://maps.google.co.uk/maps?q=nuernberg" >Nürnberg</a> to meet openSUSE community members (some of whom are employed by Novell) in person and participate in hackweek. It was great that so many people from outside Novell were able to take part this time.</p>
<p>My week was a mixture of some useful discussion about openSUSE (I&#8217;m not sure who came up with the name &#8220;chatweek&#8221;, but <a href="http://lizards.opensuse.org/2008/08/26/hackweek-iii-day-1-diary-of-an-outsider/" onclick="javascript:pageTracker._trackPageview('/outbound/article/lizards.opensuse.org');">Andrew seems to have blogged it first at least.)</a> and work on the software portal project (which I will blog about separately). I think it was productive to discuss some of the weaknesses of the openSUSE project, and what can be done to address them. I hope someone else will publish the outcomes of these discussions as I did not take very good notes.</p>
<p>It was also good to talk to people in person about the projects I am involved in (Software Portal and One Click Install) and give and be given suggestions and requests. I was able to talk to <a href="http://lizards.opensuse.org/author/kfreitag/" onclick="javascript:pageTracker._trackPageview('/outbound/article/lizards.opensuse.org');">Klass</a> about what we would need from the buildservice hermes messaging framework to allow the buildservice to push information about new packages directly to the software portal. It was also good to talk to <a href="http://linuxart.com/log/" onclick="javascript:pageTracker._trackPageview('/outbound/article/linuxart.com');">Garret</a> who has designed a vastly improved (if challenging to realise) <a href="http://ux.suse.de/~garrett/public/hackweek/oneclick/mockups/" onclick="javascript:pageTracker._trackPageview('/outbound/article/ux.suse.de');">user interface for the One Click Install handler.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://benjiweber.co.uk/blog/2008/09/02/hackweek-summary-new-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
