<?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>wuetender-junger-mann.de &#187; Software Development</title>
	<atom:link href="http://wuetender-junger-mann.de/wordpress/category/software-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://wuetender-junger-mann.de/wordpress</link>
	<description>Der Freiheit eine Gasse</description>
	<lastBuildDate>Tue, 08 May 2012 11:59:17 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Readability vs Runtime Feedback</title>
		<link>http://wuetender-junger-mann.de/wordpress/2011/09/readability-vs-runtime-feedback/</link>
		<comments>http://wuetender-junger-mann.de/wordpress/2011/09/readability-vs-runtime-feedback/#comments</comments>
		<pubDate>Sat, 17 Sep 2011 16:09:29 +0000</pubDate>
		<dc:creator>felix</dc:creator>
				<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://wuetender-junger-mann.de/wordpress/?p=1192</guid>
		<description><![CDATA[In my scala explorations I also came across the problem of testing and verifying mocks. In scala it is trivial to pass around predicates, however these are function objects, that can be applied, but don&#8217;t know much about their implementation. So while the code is readable the feedback can be quite bad. Groovy&#8217;s assert statement [...]]]></description>
			<content:encoded><![CDATA[<p>
In my scala explorations I also came across the problem of testing and verifying mocks. In scala it is trivial to pass around predicates, however these are function objects, that can be applied, but don&#8217;t know much about their implementation. So while the code is readable the feedback can be quite bad.
</p>
<p>
Groovy&#8217;s <code>assert</code> statement is a shining example, how both goals can be attainded. Just consider the following assertion:</p>

<div class="wp_syntax"><div class="code"><pre class="groovy" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">assert</span> <span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;100&quot;</span>,<span style="color: #ff0000;">&quot;Test&quot;</span>, <span style="color: #cc66cc;">11</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #CC0099;">contains</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;10&quot;</span><span style="color: #66cc66;">+</span><span style="color: #ff0000;">&quot;1&quot;</span><span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>
It is beautiful to read (as opposed let&#8217;s say hamcrast that makes me use it&#8217;s own syntax to construct an expression tree). When it comes to execute this I also do get really good feedback:<br />
<img src="http://wuetender-junger-mann.de/wordpress/wp-content/uploads/2011/09/Screen-shot-2011-09-17-at-18.06.41.png" alt="" title="Screen shot 2011-09-17 at 18.06.41" width="616" height="101" class="aligncenter size-full wp-image-1194" /></p>
]]></content:encoded>
			<wfw:commentRss>http://wuetender-junger-mann.de/wordpress/2011/09/readability-vs-runtime-feedback/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scala Compiler Quirks</title>
		<link>http://wuetender-junger-mann.de/wordpress/2011/09/scala-compiler-quirks/</link>
		<comments>http://wuetender-junger-mann.de/wordpress/2011/09/scala-compiler-quirks/#comments</comments>
		<pubDate>Sun, 04 Sep 2011 12:41:37 +0000</pubDate>
		<dc:creator>felix</dc:creator>
				<category><![CDATA[Scala]]></category>
		<category><![CDATA[Software Development]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://wuetender-junger-mann.de/wordpress/?p=1184</guid>
		<description><![CDATA[Recently I have been dabbling with scala a bit. As it happens I found a few quirks in the compiler. So does the following bit of code compiler and, if so, what does it print? object Example &#123; val x = y val y = true &#160; def main&#40;args: Array&#91;String&#93;&#41; &#123; print&#40;x&#41;; &#125; &#125; Yes [...]]]></description>
			<content:encoded><![CDATA[<p>
Recently I have been dabbling with scala a bit. As it happens I found a few quirks in the compiler.
</p>
<p>
So does the following bit of code compiler and, if so, what does it print?
</p>

<div class="wp_syntax"><div class="code"><pre class="scala" style="font-family:monospace;"><span style="color: #0000ff; font-weight: bold;">object</span> Example <span style="color: #F78811;">&#123;</span>
    <span style="color: #0000ff; font-weight: bold;">val</span> x <span style="color: #000080;">=</span> y
    <span style="color: #0000ff; font-weight: bold;">val</span> y <span style="color: #000080;">=</span> <span style="color: #0000ff; font-weight: bold;">true</span>
&nbsp;
    <span style="color: #0000ff; font-weight: bold;">def</span> main<span style="color: #F78811;">&#40;</span>args<span style="color: #000080;">:</span> Array<span style="color: #F78811;">&#91;</span>String<span style="color: #F78811;">&#93;</span><span style="color: #F78811;">&#41;</span> <span style="color: #F78811;">&#123;</span>
        print<span style="color: #F78811;">&#40;</span>x<span style="color: #F78811;">&#41;</span><span style="color: #000080;">;</span>
    <span style="color: #F78811;">&#125;</span>
<span style="color: #F78811;">&#125;</span></pre></div></div>

<p>Yes you&#8217;ll get <code>false</code> and that is plain wrong. In my opinion a compiler error would have been fine and ideally, as there are no cycles it would have just printed <code>true</code>.</p>
<p>Another major selling point of scala is it&#8217;s pattern matching mechanism. A very convenient feature is the compiler&#8217;s ability to print a warning, if the cases provided are not exhaustive. A very simple case of such a non-exhaustive match is this:</p>

<div class="wp_syntax"><div class="code"><pre class="scala" style="font-family:monospace;"><span style="color: #0000ff; font-weight: bold;">object</span> CaseExample <span style="color: #F78811;">&#123;</span>
      <span style="color: #0000ff; font-weight: bold;">def</span> main<span style="color: #F78811;">&#40;</span>args<span style="color: #000080;">:</span> Array<span style="color: #F78811;">&#91;</span>String<span style="color: #F78811;">&#93;</span><span style="color: #F78811;">&#41;</span> <span style="color: #F78811;">&#123;</span>
          <span style="color: #0000ff; font-weight: bold;">val</span> b <span style="color: #000080;">=</span> args.<span style="color: #000000;">length</span> <span style="color: #000080;">==</span> <span style="color: #F78811;">1</span>
          b <span style="color: #0000ff; font-weight: bold;">match</span> <span style="color: #F78811;">&#123;</span>
              <span style="color: #0000ff; font-weight: bold;">case</span> <span style="color: #0000ff; font-weight: bold;">true</span> <span style="color: #000080;">=&gt;</span> print<span style="color: #F78811;">&#40;</span><span style="color: #6666FF;">&quot;True&quot;</span><span style="color: #F78811;">&#41;</span>
          <span style="color: #F78811;">&#125;</span>
&nbsp;
      <span style="color: #F78811;">&#125;</span>
  <span style="color: #F78811;">&#125;</span></pre></div></div>

<p>
Unfortunately the compiler doesn&#8217;t complain at all. After some googling I came across <a href="https://issues.scala-lang.org/browse/SI-3111">SI-3111</a>. My own problem was slighty, but only slightly more complicated. I matched tupels of <code>Options</code> against <code>Some</code> and <code>None</code>.
</p>
<p>
We have been bitten by both problems, that lead to really subtle bugs. This is really unfortunate, because the compiler can do a lot more in a language like scala. The first problem gets even caught by javac.
</p>
<p>A third shortcoming of scala can be easily fixed. Set the tab size to <strong>four</strong> spaces and your code will<br />
look a lot more structured.</p>
<p>
To me it seems like the scala compiler unnessarily discredits the idea of strong static checks by a somehwat quirky implementation.</p>
]]></content:encoded>
			<wfw:commentRss>http://wuetender-junger-mann.de/wordpress/2011/09/scala-compiler-quirks/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Don&#8217;t use DITA if you don&#8217;t have to</title>
		<link>http://wuetender-junger-mann.de/wordpress/2011/06/dont-use-dita-if-you-dont-have-to/</link>
		<comments>http://wuetender-junger-mann.de/wordpress/2011/06/dont-use-dita-if-you-dont-have-to/#comments</comments>
		<pubDate>Mon, 06 Jun 2011 17:40:29 +0000</pubDate>
		<dc:creator>felix</dc:creator>
				<category><![CDATA[Hallmark of the Stupid]]></category>
		<category><![CDATA[Software Development]]></category>

		<guid isPermaLink="false">http://wuetender-junger-mann.de/wordpress/?p=1174</guid>
		<description><![CDATA[I am currently for a large organisation that seems to embrace DITA for their documentation. In theory this is a nice thing. There is a wealth of tools to edit dita files and to transform them to all sorts of formats. The reference implementation is the DITA OPEN TOOLKIT. First of all I am not [...]]]></description>
			<content:encoded><![CDATA[<p>
I am currently for a large organisation that seems to embrace <a href="http://en.wikipedia.org/wiki/Darwin_Information_Typing_Architecture">DITA</a> for their documentation. In theory this is a nice thing. There is a wealth of tools to edit dita files and to transform them to all sorts of formats. The reference implementation is the <a href="http://dita-ot.sourceforge.net/">DITA OPEN TOOLKIT</a>. First of all I am not impressed with the documentation. There is no proper tutorial and no good overview. And these are people who are into writing documentation!
</p>
<p>
The second problem is the poor quality of the tooling. It a pile of ant build files,  XSLTs and obscure jar files. This stuff is really brittle. Also it seems that people are not really concerned about having a decent continuous integration process. Documentation is rendered on some developer box, that has the <strong>&#8220;right&#8221;</strong> version of the toolkit installed. Clearly not everything that has the name Darwin on the box is good. The <a href="http://wuetender-junger-mann.de/wordpress/2010/04/practices-of-the-proper-christian-programmer/">Practices of Proper Christian Programming</a> have certainly not been followed. The whole thing is terribly brittle. Countless hours have been wasted, are being wasted and will be wasted. This is very unfortunate because documentation is often treated as a third class artefact that gets created as an afterthought using terribly blunt tools.
</p>
<p>
One decent resource is actually <a href="http://www.xmlmind.com/_tutorials/DITA/index.html">DITA for the Impatient</a>. Generally I would advise to use a custom tool chain to build your documentation. Probably something involving a templating language. Transformations should be implemented in a real programming language. As a backend things like LaTeX come to mind. Also ant is actually a crappy tool even for compiling java code, so providing decent command line utilities is key for a toolkit that claims to be universal and extensible.
</p>
<p>
<strong>Verdict:</strong> Stay clear of DITA.</p>
]]></content:encoded>
			<wfw:commentRss>http://wuetender-junger-mann.de/wordpress/2011/06/dont-use-dita-if-you-dont-have-to/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

