<?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>Blog &#187; Programming</title>
	<atom:link href="http://blog.bprog.no/index.php/category/computerstuff/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.bprog.no</link>
	<description>Some personal and some technical posts</description>
	<lastBuildDate>Sun, 14 Jun 2009 19:04:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Bash script for creating files in empty folders &#8211; Mercurial workaround</title>
		<link>http://blog.bprog.no/index.php/2009/05/bash-script-for-creating-files-in-empty-folders-mercurial-workaround/</link>
		<comments>http://blog.bprog.no/index.php/2009/05/bash-script-for-creating-files-in-empty-folders-mercurial-workaround/#comments</comments>
		<pubDate>Sun, 10 May 2009 01:00:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[Empty folders]]></category>
		<category><![CDATA[Mercurial]]></category>

		<guid isPermaLink="false">http://blog.bprog.no/?p=125</guid>
		<description><![CDATA[I was astonished to find out that Mercurial was unable to represent empty folders. The most obvious workaround is to create an empty file in each of those folders. But hey, you don&#8217;t want to do that by hand do you? Well luckily we&#8217;re all using a Linux based OS with an extremely powerful command [...]]]></description>
			<content:encoded><![CDATA[<p>I was astonished to find out that Mercurial was unable to represent empty folders. The most obvious workaround is to create an empty file in each of those folders. But hey, you don&#8217;t want to do that by hand do you? Well luckily we&#8217;re all using a Linux based OS with an extremely powerful command line. It took me just a couple of minutes to come up with a one-liner bash script which creates an empty file in every empty directory.</p>
<blockquote><p>find . -empty -type d | xargs &#8211;replace=EMPTYDIR touch &#8220;EMPTYDIR/.empty&#8221;</p></blockquote>
<p>This will put an empty file named &#8220;.empty&#8221; in every empty sub directory from where you&#8217;re standing.</p>
<p><strong><em><span style="color: #800000;">Please make sure that you copy the line correctly. There is an double hyphen before xargs&#8217;s replace parameter and regular double quotes around the touch argument. </span></em></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bprog.no/index.php/2009/05/bash-script-for-creating-files-in-empty-folders-mercurial-workaround/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A first look at Mercurial &#8211; Bye bye Subversion?</title>
		<link>http://blog.bprog.no/index.php/2009/05/a-first-look-at-mercurial-bye-bye-subversion/</link>
		<comments>http://blog.bprog.no/index.php/2009/05/a-first-look-at-mercurial-bye-bye-subversion/#comments</comments>
		<pubDate>Sun, 10 May 2009 00:39:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Mercurial SVN]]></category>

		<guid isPermaLink="false">http://blog.bprog.no/?p=123</guid>
		<description><![CDATA[I&#8217;m so sick and tired of Subversion! A couple of days ago our repository server was down which caused the f&#8230; stupid svn client to hang. Not even pressing Ctrl-C would stop it. In the end I had to kill it the hard way. This obviously messed up the svn locks. You should think that [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m so sick and tired of Subversion! A couple of days ago our repository server was down which caused the f&#8230; stupid svn client to hang. Not even pressing Ctrl-C would stop it. In the end I had to kill it the hard way. This obviously messed up the svn locks. You should think that they had implemented a timeout and sensible error message by 2009? And don&#8217;t even get me started on all those .svn directories laying around!</p>
<p>Anyway, this finally pushed me to have a look at alternatives. I&#8217;ve been wanting to try out Mercurial for some time now and this pushed me over the edge. My first impression is really good! I obviously have to spend some time getting used to the distributed model, but it seems like it might be worth it. Everything was looking rose red until I figured out that it doesn&#8217;t support tracking of empty folders!? It does make sense when I think about their architecture built up around sha1 sums, but I still think that it&#8217;s strange. I often create a directory structure before I start coding. The workaround seems to be creating empty files inside each folder, which sounds a little annoying to me.</p>
<p>That&#8217;s it for now. Man it felt good to shout and scream a little about Subversion! <img src='http://blog.bprog.no/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bprog.no/index.php/2009/05/a-first-look-at-mercurial-bye-bye-subversion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NetBeans 6.7 is looking good!</title>
		<link>http://blog.bprog.no/index.php/2009/05/netbeans-67-is-looking-good/</link>
		<comments>http://blog.bprog.no/index.php/2009/05/netbeans-67-is-looking-good/#comments</comments>
		<pubDate>Fri, 08 May 2009 20:45:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[NetBeans]]></category>

		<guid isPermaLink="false">http://blog.bprog.no/index.php/2009/05/netbeans-67-is-looking-good/</guid>
		<description><![CDATA[I&#8217;ve been trying out the beta build of NetBeans version 6.7 and it&#8217;s looking very good. The PHP support is becoming very good.
Even Grails support is coming along with support for Grails 1.1. Rumors has it that even debugging is supported now! Nice work!
]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been trying out the beta build of NetBeans version 6.7 and it&#8217;s looking very good. The PHP support is becoming very good.</p>
<p>Even Grails support is coming along with support for Grails 1.1. Rumors has it that even debugging is supported now! Nice work!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bprog.no/index.php/2009/05/netbeans-67-is-looking-good/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Grails converters not available in unit testing</title>
		<link>http://blog.bprog.no/index.php/2009/05/grails-converters-not-available-in-unit-testing/</link>
		<comments>http://blog.bprog.no/index.php/2009/05/grails-converters-not-available-in-unit-testing/#comments</comments>
		<pubDate>Fri, 08 May 2009 20:42:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[convertes]]></category>
		<category><![CDATA[grails]]></category>

		<guid isPermaLink="false">http://blog.bprog.no/?p=117</guid>
		<description><![CDATA[Bah, can&#8217;t believe that it took me that long to figure it out. Apparently you need to have the Grails application context up and running in order to use convertes (as XML / JSON) in your unit tests. After moving my test from the unit test folder over into the integration test folder it worked [...]]]></description>
			<content:encoded><![CDATA[<p>Bah, can&#8217;t believe that it took me that long to figure it out. Apparently you need to have the Grails application context up and running in order to use convertes (as XML / JSON) in your unit tests. After moving my test from the unit test folder over into the integration test folder it worked like a charm. Well, I&#8217;ve wasted time and blogged about it so you won&#8217;t have to repeat the mistake. Cheers!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bprog.no/index.php/2009/05/grails-converters-not-available-in-unit-testing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Embedded Java LDAP server for unit testing</title>
		<link>http://blog.bprog.no/index.php/2009/04/embedded-java-ldap-server-for-unit-testing/</link>
		<comments>http://blog.bprog.no/index.php/2009/04/embedded-java-ldap-server-for-unit-testing/#comments</comments>
		<pubDate>Thu, 02 Apr 2009 19:20:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[apacheds]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[ldap]]></category>
		<category><![CDATA[opends]]></category>
		<category><![CDATA[unit testing]]></category>

		<guid isPermaLink="false">http://blog.bprog.no/?p=114</guid>
		<description><![CDATA[I&#8217;ve just spent about a day trying different embeddable Java LDAP servers. To save you from all the trouble I came across I&#8217;m going to share some of my experiences.
Basically you have three choices when it comes to  embeddable Java LDAP servers (at least open source). First of you have Sun&#8217;s OpenDS, they have a [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just spent about a day trying different embeddable Java LDAP servers. To save you from all the trouble I came across I&#8217;m going to share some of my experiences.</p>
<p>Basically you have three choices when it comes to  embeddable Java LDAP servers (at least open source). First of you have Sun&#8217;s <a href="https://opends.dev.java.net/">OpenDS</a>, they have a page dedicated to <a href="https://www.opends.org/wiki/page/TipsAndTricksForWritingUnitTests">Tips and tricks for writing unit tests</a>. I have to say that I&#8217;m not very impressed by OpenDS. Don&#8217;t take me wrong it might be a fantastic LDAP server, but it certainly does not give me the feeling of being very embeddable! First of all the documentation refers to a mysterious class TestCaseUtils. I&#8217;ve checked builds from version 1.0.something to 1.2.something without finding it. The second drawback is that OpenDS is like a flesh-eating-configuration-monster sent back in time to kill the spirit of any developers getting near it. It comes with a 2000+ lines ldif config file, which is supposed to work for servers running embedded as well. It would be nice if they could provide a minimal configuration file for embedded use. To me it complained a lot about errors in the bundled schemas. Oh that&#8217;s right you need to set up a directory structure for config files, schemas and locks. Again, not very embeddable!</p>
<p>The second and third choise is <a href="http://directory.apache.org/">ApacheDS.</a> You have the newer version 1.5. with support for fancy things like triggers and stuff and you have the older 1.0 series. Both LDAPv3 compatible. The project is very well documented and they even maintain something they call Apache Directory Studio, which is a graphical LDAP GUI based on Eclipse. Very nice! If you don&#8217;t need the fancy stuff implemented in the 1.5 series I really recommend that you go for the older 1.0 series for your unit testing. You&#8217;ll find jars in Maven repos and it&#8217;s really simple to get started. It just works the way you expect it to! Just follow this <a href="http://directory.apache.org/apacheds/1.0/using-apacheds-for-unit-tests.html">guide</a> and you will be unit testing your LDAP code in no time.</p>
<p>At the time I&#8217;m writing this 1.5.4 is the newest version of the 1.5 series. They have a <a href="http://directory.apache.org/apacheds/1.5/42-using-apacheds-for-unit-tests.html">guide for doing unit testing with 1.5 as well</a>, but due to some problems it won&#8217;t work with 1.5.4 so you&#8217;ll have to build the trunk for your self or track down a Maven snapshot repo (good luck!).</p>
<p>Happy testing!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bprog.no/index.php/2009/04/embedded-java-ldap-server-for-unit-testing/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A w3.org standard for smileys?!</title>
		<link>http://blog.bprog.no/index.php/2009/01/a-w3org-standard-for-smileys/</link>
		<comments>http://blog.bprog.no/index.php/2009/01/a-w3org-standard-for-smileys/#comments</comments>
		<pubDate>Thu, 29 Jan 2009 07:24:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[emoticon]]></category>
		<category><![CDATA[smiley]]></category>
		<category><![CDATA[standard]]></category>
		<category><![CDATA[w3.org]]></category>

		<guid isPermaLink="false">http://blog.bprog.no/?p=110</guid>
		<description><![CDATA[You better be kidding me!!
http://www.w3.org/2005/Incubator/emotion/XGR-emotionml-20081120/
]]></description>
			<content:encoded><![CDATA[<p>You better be kidding me!!</p>
<p><a href="http://www.w3.org/2005/Incubator/emotion/XGR-emotionml-20081120/">http://www.w3.org/2005/Incubator/emotion/XGR-emotionml-20081120/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bprog.no/index.php/2009/01/a-w3org-standard-for-smileys/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Unit testing private methods in Java</title>
		<link>http://blog.bprog.no/index.php/2009/01/unit-testing-private-methods-in-java/</link>
		<comments>http://blog.bprog.no/index.php/2009/01/unit-testing-private-methods-in-java/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 01:26:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[reflection]]></category>
		<category><![CDATA[unit testing]]></category>

		<guid isPermaLink="false">http://blog.bprog.no/?p=101</guid>
		<description><![CDATA[Want to unit test a private method in Java?
You could obviously change your methods access modifier from private. By making it public you&#8217;re breaking encapsulation and by making it protected you&#8217;re making your API less intuitive. Don&#8217;t do that.
Another way to go about this is to create a new class that&#8217;s extending the one with [...]]]></description>
			<content:encoded><![CDATA[<p>Want to unit test a private method in Java?</p>
<p>You could obviously change your methods access modifier from private. By making it public you&#8217;re breaking encapsulation and by making it protected you&#8217;re making your API less intuitive. Don&#8217;t do that.</p>
<p>Another way to go about this is to create a new class that&#8217;s extending the one with your private method</p>
<p>I find the easiest and most convenient way achieve unit testing of private methods is <a href="http://java.sun.com/docs/books/tutorial/reflect/index.html">reflection</a>. Some of the features the Java reflection API offers is access to private fields and invocation of private methods. This sounds like something useful for our problem, by using reflection we&#8217;re able to test our private methods without making any changes to our classes.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">class</span> TestSubject <span style="color: #009900;">&#123;</span>
&nbsp;
	<span style="color: #008000; font-style: italic; font-weight: bold;">/**
	 * For some reason we want to unit-test this method
	 */</span>
	<span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000066; font-weight: bold;">int</span> adder<span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">int</span> numberOne, <span style="color: #000066; font-weight: bold;">int</span> numberTwo<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
		<span style="color: #000066; font-weight: bold;">int</span> answer <span style="color: #339933;">=</span> numberOne <span style="color: #339933;">+</span> numberTwo<span style="color: #339933;">;</span>
		<span style="color: #000000; font-weight: bold;">return</span> answer<span style="color: #339933;">;</span>
	<span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>This is the method we want to test, here is how we go around to actually do it:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">TestSubject subjectInstance <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> TestSubject<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">Class</span> testClass <span style="color: #339933;">=</span> subjectInstance.<span style="color: #006633;">getClass</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Find the method. getDeclaredMethod will give you any methods from that</span>
<span style="color: #666666; font-style: italic;">// class whether it's public or not where getMethod only will give you</span>
<span style="color: #666666; font-style: italic;">// methods with public access. The first argument is obviously our method's name,</span>
<span style="color: #666666; font-style: italic;">// where the next arguments are the formal types of the adder methods parameters.</span>
<span style="color: #003399;">Method</span> adderMethod <span style="color: #339933;">=</span> testClass.<span style="color: #006633;">getDeclaredMethod</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;adder&quot;</span>, <span style="color: #000066; font-weight: bold;">int</span>.<span style="color: #000000; font-weight: bold;">class</span>, <span style="color: #000066; font-weight: bold;">int</span>.<span style="color: #000000; font-weight: bold;">class</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// Method is a sub class of AccessibleObject if we don't call it's</span>
<span style="color: #666666; font-style: italic;">// setAccessible method we'll get an IllegalAccessException when we</span>
<span style="color: #666666; font-style: italic;">// try to invoke it on our object.</span>
adderMethod.<span style="color: #006633;">setAccessible</span><span style="color: #009900;">&#40;</span><span style="color: #000066; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
&nbsp;
<span style="color: #666666; font-style: italic;">// Invoke the method on our instance of TestSubject</span>
<span style="color: #000066; font-weight: bold;">int</span> answer <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span><span style="color: #003399;">Integer</span><span style="color: #009900;">&#41;</span> adderMethod.<span style="color: #006633;">invoke</span><span style="color: #009900;">&#40;</span>subjectInstance, <span style="color: #cc66cc;">2</span>, <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
&nbsp;
<span style="color: #666666; font-style: italic;">// assert answer = 4</span></pre></div></div>

<p>It&#8217;s more or less just to plug it into your testing framework of choice and you&#8217;ll have unit testing of your private methods.</p>
<p>But hey! Do you <em>really</em> want to unit test your private methods? Doesn&#8217;t it give you that bad feeling in your stomach. You know the feeling you get when you&#8217;re code smells a little? I mean, a part of the reason for those methods being private is that they&#8217;re subject to change.</p>
<p>It&#8217;s the oldest oo rule in the book, hide the inner working of you&#8217;re classes so you later can change the inner workings of the class without exposing any change to your clients. What you really want to do is to unit test the public methods using those private once. If you find that difficult it <em>might</em> be a little hint that you should consider changing your design a little in order to improve it&#8217;s testability.</p>
<p>Why did I bother showing you how to unit test private methods if I consider it bad practice? Well, sometimes when I&#8217;m working on complicated things I like to unit-test private methods while working on the class. And there might be situations where unit testing of private methods is the right way to go. Just be careful so you&#8217;re not writing a lot of tests you&#8217;ll waste a lot of time maintaining later!</p>
<p>Relevant Java API: <a href="http://java.sun.com/javase/6/docs/api/java/lang/Class.html">Class</a>, <a href="http://java.sun.com/javase/6/docs/api/java/lang/reflect/Method.html">Method</a> and <a href="http://java.sun.com/javase/6/docs/api/java/lang/reflect/package-summary.html">reflect</a>.</p>
<p>Happy coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bprog.no/index.php/2009/01/unit-testing-private-methods-in-java/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to auto generate UML class diagrams in JavaDoc with Maven2 and Apiviz</title>
		<link>http://blog.bprog.no/index.php/2009/01/auto-generating-uml-class-diagrams-in-javadoc/</link>
		<comments>http://blog.bprog.no/index.php/2009/01/auto-generating-uml-class-diagrams-in-javadoc/#comments</comments>
		<pubDate>Tue, 06 Jan 2009 22:43:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[javadoc]]></category>
		<category><![CDATA[maven]]></category>
		<category><![CDATA[uml]]></category>

		<guid isPermaLink="false">http://blog.bprog.no/?p=72</guid>
		<description><![CDATA[For some time I&#8217;ve been looking for a way to auto generate UML diagrams inside JavaDoc files. The perfect solution would integrate into Maven 2, which is my build system of choice. A few days ago I stumbled across Apiviz, which turned out to be exactly what I&#8217;ve been looking for! It provides simple integration [...]]]></description>
			<content:encoded><![CDATA[<p>For some time I&#8217;ve been looking for a way to auto generate UML diagrams inside JavaDoc files. The perfect solution would integrate into Maven 2, which is my build system of choice. A few days ago I stumbled across <a title="ApiWiz" href="http://code.google.com/p/apiviz/">Apiviz</a>, which turned out to be exactly what I&#8217;ve been looking for! It provides simple integration with Maven, Ant and Eclipse.</p>
<p>By default it draws implementation of interfaces and inheritance and if you add some tags / annotations to your JavaDoc it will draw composition, aggregation, dependencies and navigable relationships as well. There are some undocumented options as well. I&#8217;ve used the <a title="Netty" href="http://www.jboss.org/netty/">Netty</a> source code as a reference as it seems to be the project maintainer of Netty that&#8217;s behind ApiWiz (shoot me if I&#8217;m wrong).</p>
<p>I&#8217;m in progress of uncovering some of the undocumented features. If someone knows something I appreciate a comment below.</p>
<div id="attachment_75" class="wp-caption alignnone" style="width: 310px"><a href="http://www.jboss.org/file-access/default/members/netty/freezone/api/3.0/index.html"><img class="size-medium wp-image-75" title="Example from the Netty project" src="http://blog.bprog.no/wp-content/uploads/2009/01/package-summary-300x131.png" alt="Example from the Netty project" width="300" height="131" /></a><p class="wp-caption-text">Example from the Netty project</p></div>
<p><strong>Update:</strong> After digging through the source code (gotta love open source!) I found the documentation missing from the web page! This documentation shows how to add labels to the edges.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">apiviz<span style="color: #339933;">.</span>uses
<span style="color: #339933;">&lt;</span>FQCN<span style="color: #339933;">&gt;</span> <span style="color: #009900;">&#91;</span><span style="color: #339933;">&lt;</span>sourceLabel<span style="color: #339933;">&gt;</span> <span style="color: #339933;">&lt;</span>targetLabel<span style="color: #339933;">&gt;</span> <span style="color: #009900;">&#91;</span><span style="color: #339933;">&lt;</span>edgeLabel<span style="color: #339933;">&gt;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#93;</span>
&nbsp;
apiviz<span style="color: #339933;">.</span>has
<span style="color: #339933;">&lt;</span>FQCN<span style="color: #339933;">&gt;</span> <span style="color: #009900;">&#91;</span>oneway<span style="color: #009900;">&#93;</span> <span style="color: #009900;">&#91;</span><span style="color: #339933;">&lt;</span>sourceLabel<span style="color: #339933;">&gt;</span> <span style="color: #339933;">&lt;</span>targetLabel<span style="color: #339933;">&gt;</span> <span style="color: #009900;">&#91;</span><span style="color: #339933;">&lt;</span>edgeLabel<span style="color: #339933;">&gt;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#93;</span>
&nbsp;
apiviz<span style="color: #339933;">.</span>owns
<span style="color: #339933;">&lt;</span>FQCN<span style="color: #339933;">&gt;</span> <span style="color: #009900;">&#91;</span><span style="color: #339933;">&lt;</span>sourceLabel<span style="color: #339933;">&gt;</span> <span style="color: #339933;">&lt;</span>targetLabel<span style="color: #339933;">&gt;</span> <span style="color: #009900;">&#91;</span><span style="color: #339933;">&lt;</span>edgeLabel<span style="color: #339933;">&gt;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#93;</span>
&nbsp;
apiviz<span style="color: #339933;">.</span>composedOf
<span style="color: #339933;">&lt;</span>FQCN<span style="color: #339933;">&gt;</span> <span style="color: #009900;">&#91;</span><span style="color: #339933;">&lt;</span>sourceLabel<span style="color: #339933;">&gt;</span> <span style="color: #339933;">&lt;</span>targetLabel<span style="color: #339933;">&gt;</span> <span style="color: #009900;">&#91;</span><span style="color: #339933;">&lt;</span>edgeLabel<span style="color: #339933;">&gt;</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#93;</span></pre></div></div>

<p><em>FQCN is short for &#8220;Fully Qualified Class Name&#8221;</em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bprog.no/index.php/2009/01/auto-generating-uml-class-diagrams-in-javadoc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Hudson to autobuild Maven2 project on Subversion (SVN) commit</title>
		<link>http://blog.bprog.no/index.php/2008/12/hudson-svn-maven-autobuild/</link>
		<comments>http://blog.bprog.no/index.php/2008/12/hudson-svn-maven-autobuild/#comments</comments>
		<pubDate>Sun, 28 Dec 2008 15:49:32 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[hudson]]></category>
		<category><![CDATA[maven2]]></category>
		<category><![CDATA[subversion]]></category>

		<guid isPermaLink="false">http://blog.bprog.no/?p=67</guid>
		<description><![CDATA[The last days I&#8217;ve been testing out Hudson (in between lots of good Christmas food of course). Hudson is &#8220;an extensible continous integration engine&#8221;. That&#8217;s fancy-talk for what I like to call a build engine. It&#8217;s able to get updates from your SVN server and build the Maven project while keeping track of tasks, unit-tests [...]]]></description>
			<content:encoded><![CDATA[<p>The last days I&#8217;ve been testing out <a title="Hudson" href="http://hudson.dev.java.net/">Hudson</a> (in between lots of good Christmas food of course). Hudson is &#8220;an extensible continous integration engine&#8221;. That&#8217;s fancy-talk for what I like to call a build engine. It&#8217;s able to get updates from your SVN server and build the Maven project while keeping track of tasks, unit-tests and a lot of fancy things. The whole thing is extensible through a set of plugins. Hudson is really simple to set up, just download a jar file and run java -jar hudson.jar. Configuration and plugin download / installation is done completely within the webinterface.</p>
<p>I wanted to know whether it was possible for Hudson to build the project each time someone commits to SVN. It turnes out that there is two possibilities, a) Hudson can poll your version control server or b) you can use subversion hooks to notify Hudson of commits. Since we don&#8217;t like polling we&#8217;re going for the push method! <em>Ps! I assume that you&#8217;ve already configured Hudson to pull updates from your SVN server and build the project. </em></p>
<p>In your svn repository folder you&#8217;ll find a &#8220;hooks&#8221; folder containing a lot of .tmpl files. As you might have guessed we&#8217;re using post-commit.tmpl.  If you&#8217;re on Linux create a new file called &#8220;post-commit&#8221;, make it executable with chmod +x post-commit. Fire up your favourite browser and find the configuration interface for your project inside Hudson. Check the box saying &#8220;trigger builds remotely&#8221; and write your secret token in the text box. We&#8217;re going to need that token when we&#8217;re setting up our hook script.</p>
<p>It&#8217;s time to edit our post-commit file. I used something like this:</p>
<blockquote><p>#!/bin/sh<br />
wget -b http://<strong><em>your-hudson-url</em></strong>:8080/job/<strong><em>your-project-name</em></strong>/build?token=<em><strong>your-secret-token</strong></em><strong><em></em></strong> &gt; /dev/null</p></blockquote>
<p>Now after every commit subversion will execute this file and Hudson will build your project automaticly! <img src='http://blog.bprog.no/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bprog.no/index.php/2008/12/hudson-svn-maven-autobuild/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Skoleeksempel på hvorfor man aldri skal velge form over funksjon!</title>
		<link>http://blog.bprog.no/index.php/2008/11/skoleeksempel-pa-hvorfor-man-aldri-skal-velge-form-over-funksjon/</link>
		<comments>http://blog.bprog.no/index.php/2008/11/skoleeksempel-pa-hvorfor-man-aldri-skal-velge-form-over-funksjon/#comments</comments>
		<pubDate>Wed, 12 Nov 2008 11:03:44 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Nyheter]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://blog.bprog.no/?p=58</guid>
		<description><![CDATA[I dagens nettutgave av VG kan vi lese om en &#8220;livsfarlig&#8221; bru i Venezia der de har valgt form over funksjon. Dette er også veldig typisk i programvareutvikling der mange setter utseende høyere enn brukervennlighet.
Klassiske eksempler fra programvarens verden er Winamp og Nero. Winamp var et meget enkelt program for å spille av mp3&#8242;er, en [...]]]></description>
			<content:encoded><![CDATA[<p>I dagens nettutgave av VG kan vi lese om en &#8220;livsfarlig&#8221; bru i Venezia der de har valgt form over funksjon. Dette er også veldig typisk i programvareutvikling der mange setter utseende høyere enn brukervennlighet.</p>
<p>Klassiske eksempler fra programvarens verden er Winamp og Nero. Winamp var et meget enkelt program for å spille av mp3&#8242;er, en oppgave den utførte meget bra. Da de lanserte versjon 3 med pompøst brukergrensesnitt og mer funksjonalitet mistet de populariteten så godt som over natten. Nero var et program som var veldig bra til å brenne cd plater, akkurat det man forventer av et brenne-program. I det de lanserte oppfølgeren på flere hundre megabyte med &#8220;fancy&#8221; brukergrensesnitt, lyd og videoredigering, coverdesign og sikkert mye mer sluttet programmet å appellere til de som faktisk brukte det.</p>
<p>Moralen: Aldri velg form over funksjonalitet! En ting, om det er et dataprogram, en bru, en heis eller hva som helst: Det skal gjøre èn ting og den ene tingen skal gjøres bra!</p>
<p><a title="http://www.vg.no/reise/artikkel.php?artid=522394" href="http://www.vg.no/reise/artikkel.php?artid=522394"><br />
</a><a href="http://www.vg.no/reise/artikkel.php?artid=522394">http://www.vg.no/reise/artikkel.php?artid=522394</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.bprog.no/index.php/2008/11/skoleeksempel-pa-hvorfor-man-aldri-skal-velge-form-over-funksjon/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
