<?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>Schauderhaft &#187; Softwareentwicklung</title>
	<atom:link href="http://blog.schauderhaft.de/category/softwareentwicklung/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.schauderhaft.de</link>
	<description>Softwaredevelopment, Projectmanagement, Qualitymanagement and all things &#34;schauderhaft&#34;</description>
	<lastBuildDate>Sun, 05 Feb 2012 20:46:36 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Boolean Stack</title>
		<link>http://blog.schauderhaft.de/2009/05/11/boolean-stack/</link>
		<comments>http://blog.schauderhaft.de/2009/05/11/boolean-stack/#comments</comments>
		<pubDate>Mon, 11 May 2009 12:18:09 +0000</pubDate>
		<dc:creator>Jens Schauder</dc:creator>
				<category><![CDATA[Softwareentwicklung]]></category>

		<guid isPermaLink="false">http://blog.schauderhaft.de/2009/05/11/boolean-stack/</guid>
		<description><![CDATA[Many business people don&#8217;t understand Boolean logic, at least not on the abstract level that developers are used to. And that is perfectly ok, since they don&#8217;t have to instruct stupid things like computers to do their work. They either talk to other people, who are happy to base decision on a handful of examples [...]]]></description>
			<content:encoded><![CDATA[<p>Many business people don&#8217;t understand Boolean logic, at least not on the abstract level that developers are used to. And that is perfectly ok, since they don&#8217;t have to instruct stupid things like computers to do their work. They either talk to other people, who are happy to base decision on a handful of examples and ask if they aren&#8217;t sure, or they tell developers like me to instruct the computers. But here comes a common problem: When the computer is supposed to make a decision, I as a programmer have to tell it about all the parameters for the decision, including all the weird corner cases that a human would solve by asking the boss.</p>
<p>So let&#8217;s say there are 10 Boolean conditions involved in the decision, That&#8217;s 2 to the power of 10 or 1024 different cases. Resulting in a very long question and answer session. Luckily in most case one can simplify the decision a lot by combining hole groups of cases. E.g. if the first three parameters are true, the other seven conditions might not matter anymore. While this shortens the Boolean expression,it also makes it really hard to understand what is going on. You are now stuck with a Boolean expression where one has to look very precisely in order to determine which case applies and what it results in.</p>
<p>In my experience many Boolean problems in programming don&#8217;t actually need the full complexity of Boolean expressions. An example: Enabling or disabling a button that represents an action on a domain object. Here are the conditions that apply for enabling the button: If authorization is activated he user needs the privileges for that action; the domain object needs to be of  type A, B or C; if the action is state dependent the domain object has to be in the appropriate state. Although these are only a couple conditions, the resulting Boolean expression can become quite involved. And don&#8217;t even think about adding rules later on. But if you bring it in the structure I call &#8216;Boolean Stack&#8217; it becomes rather easy and transparent.</p>
<p>A Boolean Stack consists of two sets of rules: allowing rules and denying rules. The result of the stack is <strong>true</strong>  if at least one of the allowing rules is true, and none of the denying rules is true.</p>
<p>So in the example above the allowing rules would be:</p>
<ul>
<li>The domain object is of type A</li>
<li>The domain object is of type B</li>
<li>The domain object is of type C</li>
</ul>
<p>And the denying rules would be:</p>
<ul>
<li>The user has not the required privilege</li>
<li>The object has not the correct state</li>
</ul>
<p>Note that for typical changes in the conditions: new Types that support the action, Actions that are  not state dependent rules get added or removed from the set, instead of manipulating the Boolean expression itself.</p>
<p>Using this structure complex Boolean expressions become easy to understand and to maintain. I have used the structure for things like enabling / showing controls in a GUI as in the example, but also for deciding if a train may leave a station, which is at least in Europe controlled by literally hundreds of rules and conditions, which differ depending on the state the train starts and to which state it travels.</p>
<p>I am wondering if every Boolean condition can be transformed into this scheme. I actually think so, maybe I&#8217;ll find time to proof (or disproof) it some day.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.schauderhaft.de/2009/05/11/boolean-stack/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle Naming Strategy for Hibernate Released as a proper Open Source Project</title>
		<link>http://blog.schauderhaft.de/2009/03/07/oracle-naming-strategy-for-hibernate-released-as-a-proper-open-source-project/</link>
		<comments>http://blog.schauderhaft.de/2009/03/07/oracle-naming-strategy-for-hibernate-released-as-a-proper-open-source-project/#comments</comments>
		<pubDate>Sat, 07 Mar 2009 20:21:13 +0000</pubDate>
		<dc:creator>Jens Schauder</dc:creator>
				<category><![CDATA[Datenbank]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[Softwareentwicklung]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.schauderhaft.de/2009/03/07/oracle-naming-strategy-for-hibernate-released-as-a-proper-open-source-project/</guid>
		<description><![CDATA[I am a big fan of creating at least the basic structure of your database from the domain model using hibernate. But if you work with Oracle you know on problem with this approach: the length of names is seriously limited for tables and columns. So if you have a  inner class with embeddables you [...]]]></description>
			<content:encoded><![CDATA[<p>I am a big <a href="/2008/11/27/why-hibernate-is-so-much-more-powerful-than-jdbc/">fan of creating at least the basic structure of your database from the domain model using hibernate</a>. But if you work with <a href="http://www.oracle.com">Oracle</a> you know on problem with this approach: the length of names is seriously limited for tables and columns. So if you have a  inner class with embeddables you pretty soon bump against that limit of 30 characters.</p>
<p>I published before an <a href="/2008/02/22/hibernate-namingstrategy-fur-oracle/">OracleNamingStrategy</a> that fixes this problem by creating abbreviations on this blog. But writing a <a href="/2008/03/29/hibernate-naming-strategie-fur-oracle-die-zweite/">new blog entry</a> with all the code every time I find a little glitch in the code felt just wrong. So I published it as an official Open Source Project over at <a href="http://code.google.com/">google code</a>: <a href="http://code.google.com/p/hibernate-naming-strategy-for-oracle/">The Hibernate Naming Strategy for Oracle!</a> And I just released the first version. and since it is so extremely simple, it isn&#8217;t even a jar but a <a href="http://code.google.com/p/hibernate-naming-strategy-for-oracle/downloads/list">single java file</a>.</p>
<p>I&#8217;d be glad if this is of some use for other developers. If you like it, drop me a line in the comments. If you find a bug or have an idea for improvement use the <a href="http://code.google.com/p/hibernate-naming-strategy-for-oracle/issues/list">issue tracker</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.schauderhaft.de/2009/03/07/oracle-naming-strategy-for-hibernate-released-as-a-proper-open-source-project/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Need an Idea for a Project? just Pick One.</title>
		<link>http://blog.schauderhaft.de/2009/02/28/need-an-idea-for-a-project-just-pick-one/</link>
		<comments>http://blog.schauderhaft.de/2009/02/28/need-an-idea-for-a-project-just-pick-one/#comments</comments>
		<pubDate>Sat, 28 Feb 2009 09:26:23 +0000</pubDate>
		<dc:creator>Jens Schauder</dc:creator>
				<category><![CDATA[Creativity]]></category>
		<category><![CDATA[Softwareentwicklung]]></category>

		<guid isPermaLink="false">http://blog.schauderhaft.de/2009/02/28/need-an-idea-for-a-project-just-pick-one/</guid>
		<description><![CDATA[Since the days still only contain 24hours (sometimes they even steal a second) I don&#8217;t have the time to put most of my weird ideas into reality. So here are some of my ideas for you to pick and to become rich and famous or one of the thousands of sole open source developers that [...]]]></description>
			<content:encoded><![CDATA[<p>Since the days still only contain 24hours (sometimes they even steal a second) I don&#8217;t have the time to put most of my weird ideas into reality. So here are some of my ideas for you to pick and to become rich and famous or one of the thousands of sole open source developers that know both users of their software by first name <img src='http://blog.schauderhaft.de/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<ul>
<li>a plugin for your preferred IDE to create database migration scripts based on code changes on JPA annotated classes. So if you rename a field in a classs it would rename the matching column. If you add a field, it would add a column and so on. In the second version it should support refactorings on these scripts, like merging a drop column and a create column to a rename column script and vice versa.</li>
<li>an iphone app that allows to make measures with the iphone. If you accelerate the iphone from a starting point and stop at some other time one should be able to calculate the distance travelled from acceleration and duration. I&#8217;d be curious what the size of the error would be from that kind of measurement.</li>
<li>an iphone app that works like an sonar. You would produce a ping with a speaker and analyze what you receive through the microphone. From that you might be able to estimate the size of the room you are in. Of course you may as well look up from your iphone.</li>
<li>another iphone app: take a photo of your poker hand, and a photo of the board and get the odds for your hand calculated.</li>
<li>visualize a class diagram in a 3D graph and use a wii remote and the technique shown at <a href="http://www.ted.com/index.php/talks/johnny_lee_demos_wii_remote_hacks.html">TED</a> to convey the 3D impression.</li>
<li>a PL/SQL language plugin for eclipse (or any other decent IDE), with the usual support for refactoring and the like.</li>
</ul>
<p>What are your ideas for software projects that you just haven&#8217;t enough time for?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.schauderhaft.de/2009/02/28/need-an-idea-for-a-project-just-pick-one/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Logging</title>
		<link>http://blog.schauderhaft.de/2009/02/24/logging/</link>
		<comments>http://blog.schauderhaft.de/2009/02/24/logging/#comments</comments>
		<pubDate>Tue, 24 Feb 2009 19:56:05 +0000</pubDate>
		<dc:creator>Jens Schauder</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Softwareentwicklung]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://blog.schauderhaft.de/2009/02/24/logging/</guid>
		<description><![CDATA[Stephan Schmidt writes about logging in his latest article. I think he has 7 mostly valid points and even 7 more in an older post, but there is one advice that is missing, which also invalidates one of his points: Use different logging hierarchies Why? Well Stephan writes in the first article: Logging in web [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.codemonkeyism.com/about/">Stephan Schmidt</a> writes about <a href="http://www.codemonkeyism.com/archives/2009/02/23/7-more-good-tips-on-logging/">logging in his latest article</a>. I think he has 7 mostly valid points and even 7 more in an older post, but there is one advice that is missing, which also invalidates one of his points:</p>
<p><strong>Use different logging hierarchies</strong></p>
<p>Why? Well Stephan writes in the first article:</p>
<blockquote><p>Logging in web applications is important &#8211; to know what’s going on, for performance tuning and incident analyis.</p></blockquote>
<p>So what do you do if you have performance issues in your system? You change your log level from WARNING or ERROR to INFO. So you get more detailed information. But now you get tons of logging that you are not interested in. In most logging approaches I have seen there is only one logging hierarchy. Normaly based on the full class name. But which class is responsible for performance related logging? Most of the time there is none. But one could easily use a prefix to differentiate between various aspects of logging. I&#8217;d like to propose these logging hierarchies:</p>
<p>no prefix: the normal technical logging used for debugging and exception logging</p>
<p>TIMING: logging of performance relevant information, i.e. time elapsed between start and end of method calls. On DEBUG level this is reported for every method, on INFO this is reported on all public methods, on WARN on all calls that go between packages and on ERROR only on calls from outside the controlled code and to remote resources (database, webservices and so on). Once the application runs stable you should get a baseline from this.</p>
<p>SECURE: logging of security relevant information: failed logins, creation of users, access of invalid urls, input values that look like some kind of XXX-injection, spikes in the number of requests. In this case the log level should control the thresholds on which logging appears.</p>
<p>AUDIT: logging information about completed (or failed) business transactions. This might be overkill for applications that work on a single database. But the application I am working on right now consists of about 50 pieces of hardware and a similar amount of various software pieces. It would be awesome if we could have a logging that basically says: Node A thought it completed a transaction but the transaction never apeared on Node C so we probably have a problem in Node B between A and B.</p>
<p>USER: logging information about user behavior. Invalid Data entered. Actions used. This should be an awesome source of information about which features work, which don&#8217;t and what pieces are really confusing for the user. With this I obviously do not agree with</p>
<blockquote><p>Only log technical exceptions not user exceptions</p></blockquote>
<p>For implementing these different loggers AOP comes in handy and you absolutely should look at <a href="http://logging.apache.org/log4j/1.2/apidocs/index.html">MDC</a>. Go figure</p>
<p>Any other logging hierarchies one should consider? Leave a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.schauderhaft.de/2009/02/24/logging/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Code Coverage for Oracle</title>
		<link>http://blog.schauderhaft.de/2009/02/18/code-coverage-for-oracle/</link>
		<comments>http://blog.schauderhaft.de/2009/02/18/code-coverage-for-oracle/#comments</comments>
		<pubDate>Wed, 18 Feb 2009 18:35:36 +0000</pubDate>
		<dc:creator>Jens Schauder</dc:creator>
				<category><![CDATA[Datenbank]]></category>
		<category><![CDATA[Softwareentwicklung]]></category>

		<guid isPermaLink="false">http://blog.schauderhaft.de/2009/02/18/code-coverage-for-oracle/</guid>
		<description><![CDATA[I try to minimize the use of database specific programming languages like PL/SQL. It is just annoying to work with a language that is just badly designed and has hardly any serious tool support. It (and the IDEs around it) is lacking in so many ways. All the things I would expect from the most [...]]]></description>
			<content:encoded><![CDATA[<p>I try to minimize the use of database specific programming languages like PL/SQL. It is just annoying to work with a language that is just badly designed and has hardly any serious tool support. It (and the IDEs around it) is lacking in so many ways. All the things I would expect from the most basic development environment are missing.</p>
<p>Yet sometimes we can’t help it and just have to use PL/SQL for performance or political reasons, but it really hurts.<br />
And the frustrating part: Nobody seems to care.</p>
<p>Nobody? There are a few guys working on these things. I wrote <a href="/2008/12/19/news-on-testing-for-databases/">about Tim High</a> before. Yesterday he left a <a href="/2008/12/19/news-on-testing-for-databases/#comment-136">comment</a> on the post to inform me that he wrote another article that might interest me. Completely superfluous. I already picked it up on DZone and marked it for future reference in my blog. So here it is:</p>
<p><a href="http://timhigh.wordpress.com/2009/02/17/test-coverage-reporting-on-oracle-10g/trackback/">Test Coverage Reporting on Oracle 10g</a></p>
<p>Tim uses the data from the profiler to gather line coverage data and even puts it in a very nice report.<br />
<img src="http://timhigh.files.wordpress.com/2009/02/report-example.png?w=450&amp;h=317" alt="Image of a code coverage report for a oracle package" /></p>
<p>While beautiful in the result it is a tough way to get there with many scripts and some requirements on the code style. But its “better than nothing” as the saying goes in northern westfalia. So my next project which requires more than trivial PL/SQL code will get code coverag. Isn&#8217;t that great?</p>
<p>Apparently Tim worked together with Oracle on this so there is the very slight chance that Oracle or Toad or their competition will realize that there is a difference between a GUI for easy SQL hacking and a IDE that allows controlled software development.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.schauderhaft.de/2009/02/18/code-coverage-for-oracle/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Programming should be Taught just as a Craft</title>
		<link>http://blog.schauderhaft.de/2009/02/13/programming-should-be-taught-just-as-a-craft/</link>
		<comments>http://blog.schauderhaft.de/2009/02/13/programming-should-be-taught-just-as-a-craft/#comments</comments>
		<pubDate>Fri, 13 Feb 2009 19:59:04 +0000</pubDate>
		<dc:creator>Jens Schauder</dc:creator>
				<category><![CDATA[Management]]></category>
		<category><![CDATA[Softwareentwicklung]]></category>
		<category><![CDATA[Wissensmanagement]]></category>

		<guid isPermaLink="false">http://blog.schauderhaft.de/2009/02/13/programming-should-be-taught-just-as-a-craft/</guid>
		<description><![CDATA[As everybody in the IT blogosphere knows by now Jeff Atwood started quite some discussion with his opinion that there might be too many rules out there for developers to follow. I think the opposite is true. I think the IT industry is still a mess because 90% of the members of this industry do [...]]]></description>
			<content:encoded><![CDATA[<p>As everybody in the IT blogosphere knows by now Jeff Atwood started <a href="http://codebetter.com/blogs/rob.conery/archive/2009/02/11/patterns-purists-and-sinkholes.aspx">quite some</a> <a href="http://www.kevinwilliampang.com/post/Jeff-Atwood-Finally-Jumps-the-Shark.aspx">discussion </a>with his opinion that there might be <a href="http://www.codinghorror.com/blog/archives/001225.html">too many rules</a> out there for developers to follow. I think the opposite is true. I think the IT industry is still a mess because 90% of the members of this industry do not know the rules, let alone follow them.</p>
<p>Sure it would be no fun to think about some 100 coding rules and guidelines for every line of code you write. It would be slow a tedious and would take forever. But that’s not the way it is working. All the good developers, the pragmatic programmers do stick to the rules. But they don’t do that by actively thinking about the rules, they just learned the rules until they became their second nature. And only in difficult corner cases do they actively think about the rules, consider which one applies and if it might be one of the cases where you should break the rules. The problem is many developers do not know the rules and they will never learn them because nobody tells them I they don’t ask.</p>
<p>This should change. I envision a future where programmers are trained just as a craftsman. When you are trained as carpenter or welder, you get to do really simple things. Like joining to pieces of wood or metal or making a cube exactly 5cm big. And when the angle is straight or if it is 5.1 cm big or if it has some ugly scratches you throw it away and start over. And if your join is perfect and the cube is perfect you throw it away and do it again. Until each and every join and each and every cube you make is really nice and clean. And only then you get to do these things on the real job, until after a couple of years you know all the skills all the tricks you need to work as a craftsman. During a large part of that time you work for some really experienced master whose main task is to train you and maybe 10-20 other apprentices.</p>
<p>Compare that to the education as a developer. At least in Germany there are three ways to become a programmer:</p>
<ol>
<li>You teach yourself and find a job. No formal training. It is pure luck if you found the important rules that really help you and prevent nightmares for the customers</li>
<li>You study computer science and get a job as a developer. You probably know how a parser and a compiler work, how to proof an algorithm correct and how a Turing machine works. But chances are that you never did a branch in some kind of version control. If you did you probably did it in your spare time and not at the university.</li>
<li>You get an apprenticeship. In this case you probably know how to do simple programs like a calculator. You wrote the calculator application once. And the source code sucks big time, but nobody told you as long as it works.</li>
</ol>
<p>In any case very few of the new developers know even the simplest rules like:</p>
<ul>
<li> Use a version control system.</li>
<li>If your code needs a lot of comments it sucks.</li>
<li>Singletons are evil, most probably don’t even know the singleton (anti)pattern.</li>
<li>…</li>
</ul>
<p>What is the reason for this? Non developers can’t judge software. When a table is not well made you will notice pretty quickly. It will wobble and finally break. But if software is a big ball of mud inside, you won’t notice. Sure it has bugs, but all software has bugs. And it is expensive to change it but you don’t have anything to compare it to. Therefore junior developers or people that want to become developers get to work on real customer projects without any real supervision. Hardly anybody looks at their code, nobody tells them the rules and they don’t have the time to train the rules.<br />
So how should education for future software developers look like? Teach the rules. Give them easy tasks: Implement an algorithm; implement it using an iterative approach; implement it using recursion; implement it in java; haskell, lisp, fortran, groovy; make it as fast as possible; make it as small as possible; make it as easy to understand as possible; make it scalable for hundreds of processors; write tests for it until they reach 100% statement coverage; break the implementation of some other student without breaking the tests; write test until they reach 100% path coverage; break the implementation of some other student without breaking the tests; Train the use of version control, build tools and the like with the same approach. Check every single result a student creates. If it doesn’t follow the rules let them do it again.<br />
I think it is obvious that the IT-industry would be better off, when people get a lot of supervised education in programming. This seems to cost a lot of money, but I actually think it is a business idea! How about this:<br />
Start a private software development school. Since you need the best teachers you get fees will be high. Arrange for scholarships by big IT-companies or let the students pay via some credit scheme where they pay only after they finished school. Come up with a strict curriculum. There is plenty input available. Also have a look at high end (military) schools. They don’t just teach the main subjects, but also general knowledge and physical training is mandatory. So this as well as creativity, presentation techniques would find their place in the curriculum. Pick your students carefully and kick those out that don’t meet the requirements. So why should people give you big lumps of money for this? How about a promise: “If you finish school here we guarantee you an offer for a job with a salary of at least X$. If not we pay you 50cent for every $ difference” I am pretty sure, a school as sketched could promise that without too much of a risk.<br />
What do you think? Would you consider such a school as a starting point for your career in software development?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.schauderhaft.de/2009/02/13/programming-should-be-taught-just-as-a-craft/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Don&#8217;t Keep your Tests Green</title>
		<link>http://blog.schauderhaft.de/2009/02/03/dont-keep-your-tests-green/</link>
		<comments>http://blog.schauderhaft.de/2009/02/03/dont-keep-your-tests-green/#comments</comments>
		<pubDate>Tue, 03 Feb 2009 09:04:44 +0000</pubDate>
		<dc:creator>Jens Schauder</dc:creator>
				<category><![CDATA[Quality Management]]></category>
		<category><![CDATA[Softwareentwicklung]]></category>

		<guid isPermaLink="false">http://blog.schauderhaft.de/2009/02/03/dont-keep-your-tests-green/</guid>
		<description><![CDATA[Wait &#8230; wasn&#8217;t that &#8216;Keep your tests green&#8217;? Of course I agree, if 50% of your tests are red all the time you have a problem. BUT if 100% of the tests are green all the time, then how do you know they can actually detect the errors they are supposed to cover? Simple answer [...]]]></description>
			<content:encoded><![CDATA[<p>Wait &#8230; wasn&#8217;t that &#8216;Keep your tests green&#8217;? Of course I agree, if 50% of your tests are red all the time you have a problem. BUT if 100% of the tests are green all the time, then how do you know they can actually detect the errors they are supposed to cover? Simple answer you don&#8217;t.</p>
<p>It really sounds like a trivial thing, but it isn&#8217;t. So far I have three times accountered scenarios where tests couldn&#8217;t possibly become red. And in all cases this went undetected at least for some time:</p>
<ul>
<li>The first time I finally found the problem, when I by excident ran code coverage not only for the code under test but also for the Tests themself. I was quite surprised to find many classes with partial coverage as well with no coverage at all. The partial coverage turned out to be ok. This was due to tests checking for thrown exceptions. Those resulted in segments of the testcode that where never run. But the Tests that never ran at all, well they never ran at all. They were not included in any test suite.</li>
<li>The next time we were using Teamcity to run our tests on each commit. We were kind of proud of ourself, because the tests where green for quite some time now. We clicked around in the statistic a little just to show to ourself how great we were. But what was that?The number of executed tests wen&#8217;t down! Two days ago it went from 396 to 387! Who the heck deleted the tests? Well nobody did. But a change in the code caused an exception during setup of some tests. And this exception was silently ignored by Teamcity. But the associated tests of course didn&#8217;t ran, thus reducing the test count. <a href="http://www.jetbrains.net/jira/browse/TW-3809">JetBrains is aware of the problem</a>, but it doesn&#8217;t seem to be high on the priority list.</li>
<li>I detected the last on when I tried to gather some code statistics for a project and didn&#8217;t get any results. In this case no tests where run at all! The team used the <a href="http://ant.apache.org/manual/OptionalTasks/junit.html">ant junit target</a> with the batchtest nested element. But the pattern they used was wrong. So no tests where picked up. But since no tests failed the build was reported as a success.</li>
</ul>
<p>All cases where pretty trivial to fix, but also in all cases the not excecuted tests surfaced some problem when they where finally executed. So do yourself a favor and make sure that</p>
<ul>
<li>your tests can fail (test first is one way to do that) .</li>
<li>all your tests do run (using code cover and examination of statistics)</li>
</ul>
<p>And only than make sure that your tests stay green.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.schauderhaft.de/2009/02/03/dont-keep-your-tests-green/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Interfaces for Databases</title>
		<link>http://blog.schauderhaft.de/2009/01/14/interfaces-for-databases/</link>
		<comments>http://blog.schauderhaft.de/2009/01/14/interfaces-for-databases/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 22:32:06 +0000</pubDate>
		<dc:creator>Jens Schauder</dc:creator>
				<category><![CDATA[Agil]]></category>
		<category><![CDATA[Datenbank]]></category>
		<category><![CDATA[Softwareentwicklung]]></category>

		<guid isPermaLink="false">http://blog.schauderhaft.de/2009/01/14/interfaces-for-databases/</guid>
		<description><![CDATA[I wrote before about the maturity (or lack thereof) of the art of software development in the database realm. So did others. One thing I noted is that there is no discussion on how to break down a database into modules or packages. So today instead of mainly complaining, I&#8217;going to make a proposal on [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote before about the maturity (or lack thereof) of the art of <a href="http://blog.schauderhaft.de/2008/08/31/datenbankesign/">software development in the database realm</a>. <a href="http://martinfowler.com/bliki/DatabaseThaw.html">So did others</a>.<br />
One thing I noted is that there is no discussion on how to break down a database into modules or packages.</p>
<p>So today instead of mainly complaining, I&#8217;going to make a proposal on how to manage you database in a modular fashion.</p>
<p>One of the strengths of databases is the concept of foreign keys, a declarative way of enforcing relationships.<br />
But when it comes to modularity, foreign keys are the source of all evils. They link two tables with each other and there is no standard way to remove the dependency. In object oriented computing languages this would be done with interfaces.</p>
<p>Instead of Class A directly referencing Class B it would reference a nInterface IB and Class B would implement that interface. We now can replace Class B and Instances of Class A won&#8217;t notice. How can we achieve this with databases?</p>
<p>Probably the first idea that comes to mind is “views!”. Views are basically select statements with the name. They do hide dependencies to the underlying tables so that is a start, but they do not correspond to interfaces for two reasons.</p>
<p>First: The dependency between a table and a view is just the opposite way than the dependency between a class and an interface. This means we can&#8217;t reference views in our code and simply swap the underlying table.</p>
<p>Second: At least Oracle (and I guess this is true for most databases) can&#8217;t use a view a foreign key relationship.<br />
So views don&#8217;t help that much.</p>
<p>Let&#8217;s look once more at classes, interfaces. One thing to realize is that in the example above there is  a dependency between Instances of A and B but not between their classes. The dependency between the instances is created at runtime. How does that help with databases? Typically classes are identified with tables and instances with rows in tables and that works just fine for ORM tools.</p>
<p>But I want to propose a different mapping. How about considering the create script of the table “the class” and the actual table in a database a instance. If you choose this approach, everything falls into place. The interface becomes a create script that just creates the most essential columns of a table, possibly only the primary key. You now can have different implementing tables / scripts, which either add columns for your normal production version of the table or a more simple version with only a couple of fields. Or you create no additional fields at all.</p>
<p>Obviously this makes organizing the scripts more complex in the first step. What are the benefits? Actually this can help in many ways.</p>
<p>You can use it for testing. With database testing a common problem is the setup of test data. Since everything is connected with foreign keys you need to create tons of master data in order to just create a single row that you actually want to use in your test. Know you replace all tables referenced by the table you want to use in the test with dummy implementations, featuring just the primary key, so no further dependencies and the setup can happen easily, possibly automatically.</p>
<p>You can use it for a modular application. Imagine an application that references some kind of &#8216;Order&#8217;. One customer wants an extremely simple order with just one line item with a fixed quantity of 1. For another customer it is the average order with multiple line items, different units of quantities (string is sold by the meter, other stuff is sold by piece &#8230;). The third customer has extremely complex orders with rules governing what combinations of line items can go into a single order. You know this kind of order when you ever <a href="http://cc5.volkswagen.de/cc5/preselect.aspx?process=motorselect&amp;template=new_beetle_cabriolet_freestyle_freestyle&amp;context=default&amp;app=ICC-DE">configured a car online</a>. The forth customer has a different kind of order, but that doesn&#8217;t matter because it is a third party system and your application has just to maintain a reference.</p>
<p>Normally you need a table structure that combines all possible implementations, making it more complex than even the most complex implementation that you actually need. With the proposed approach you&#8217;ll have four different implementations and can choose the one you need for each deployment.</p>
<p>So how do we actually do this? Well that is the real challenge. Right now I don&#8217;t know of any tool supporting this. One could use Hibernate with a dynamically created <a href="http://www.hibernate.org/hib_docs/v3/api/org/hibernate/cfg/Configuration.html">Configuration</a>. But there are things in a database that you probably don&#8217;t want to control via hibernate (e.g. partitions and tablespaces). You could create your own little script assembly tool, store DDL scripts in a directory structure, that has branches for each implementation variant. A little configuration file would define what implementation variant to use for which object. In any case we would need to stop developing directly in a database. We should work on the file system and deploy into a database even in development instead.</p>
<p>I guess there is plenty of room for more ideas and of course tools. What do you think? Is this an approach that could pay off? Is this old stuff and I just reinvented the wheel? Or is all this completely stupid and should be handled differently?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.schauderhaft.de/2009/01/14/interfaces-for-databases/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Ribbon Sucks</title>
		<link>http://blog.schauderhaft.de/2009/01/08/the-ribbon-sucks/</link>
		<comments>http://blog.schauderhaft.de/2009/01/08/the-ribbon-sucks/#comments</comments>
		<pubDate>Thu, 08 Jan 2009 21:49:53 +0000</pubDate>
		<dc:creator>Jens Schauder</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Softwareentwicklung]]></category>

		<guid isPermaLink="false">http://blog.schauderhaft.de/2009/01/08/the-ribbon-sucks/</guid>
		<description><![CDATA[If you are working with Office 2007 you know the Ribbon. If you don&#8217;t you are a lucky bastard. Although Office has many bugs and is a major case of feature bloat, but up to now I always stood up to defend it, because most of the stuff I use works ok, and that is [...]]]></description>
			<content:encoded><![CDATA[<p>If you are working with Office 2007 you know the Ribbon. If you don&#8217;t you are a lucky bastard.</p>
<p>Although Office has many bugs and is a major case of feature bloat, but up to now I always stood up to defend it, because most of the stuff I use works ok, and that is probably more than 90% of the Office Users use. AND alternatives aren&#8217;t really there yet. Ok there is Open Office but the last time I looked at it, it was horrible, ugly, buggy and IMHO only usable for private use.</p>
<p>But now the ribbon enters the room. At least in the way it is implemented in Office it is the biggest usability road block short of a system crash. But first what is this ribbon thing anyway?</p>
<p>The ribbon is a GUI Component which replaces the menu bar and the toolbar found in so many applications. It looks like this:</p>
<p><a href="http://blog.schauderhaft.de/wp-content/uploads/2009/01/ribbon.jpg" title="The Ribbon"><img src="http://blog.schauderhaft.de/wp-content/uploads/2009/01/ribbon.jpg" alt="The Ribbon" width="559" height="96" /></a></p>
<p>(Click on the image for a full size version)</p>
<p>At first sight it looks just like a menu bar + a toolbar with different size icons and other elements in it. But this is a misconception.</p>
<ul>
<li> The menu bar is not really a menu bar but tabs, which one uses to switch between different toolbars.</li>
<li>There is an additional thingy on the top which contains some actions like save, undo and redo called the Qick Access Toolbar:<br />
<a href="http://blog.schauderhaft.de/wp-content/uploads/2009/01/shortcut.jpg" title="Quick Access Toolbar"><img src="http://blog.schauderhaft.de/wp-content/uploads/2009/01/shortcut.jpg" alt="Quick Access Toolbar" /></a></li>
<li>The is a big ugly bubble like icon which is actually a button, which is more or less the file menu:<br />
<a href="http://blog.schauderhaft.de/wp-content/uploads/2009/01/application-menu.jpg" title="Screenshot: application menu"><img src="http://blog.schauderhaft.de/wp-content/uploads/2009/01/application-menu.jpg" alt="Screenshot: application menu" /></a></li>
</ul>
<p>If you are a developer there is also a document for you which describes, <a href="http://msdn.microsoft.com/en-us/library/cc872782.aspx">how you are supposed to use the ribbon component</a> in the applications you create.</p>
<p>So what is wrong with all this?</p>
<p>Let´s start with the minor annoyances:</p>
<p>The more important commands in the Ribbon should get larger icons. Great. Just nobody asked me what is important for me. For example the different layouts you can view a word document with are NOT important for me. For me the whole concept of different layouts for viewing cut go away. I wouldn&#8217;t miss it. It actually would be an improvement, because it would stop word from opening documents &#8216;for full screen reading&#8217;.</p>
<p>Who had the weird idea that a two column menu (like the windows start button or the ribbon application button) is a good idea? It is probably the same guy that came up with the idea to add two buttons and a weird extra panel to the menu. Why there aren&#8217;t just three more menu items labeled &#8216;Recent Documents&#8217;, &#8216;Options&#8217; and &#8216;Exit&#8217;? I have no idea.</p>
<p>But now it is getting serious, at least for me. For me toolbars and menus had two very distinct purposes: Toolbars where for quickly accessing stuff. Since I mostly use keyboard stuff for thing I need often. I don&#8217;t use toolbars to much. Menus are for looking up commands that I know are somewhere, but I don&#8217;t know the shortcut. In this case I look at the available menus, pick the one that sounds promising, and scan all the items in it. This approach completely fails with the ribbon!</p>
<p>Microsoft completely messed up the grouping of commands.<br />
The design guide says explicitly:</p>
<blockquote><p>Avoid arbitrary command placement. Suppose that you think you have a good tab and group design, but discover that several commands just don&#8217;t fit in. Chances are, your tab and group design isn&#8217;t as good as you think it is, and you need to continue to refine it. Don&#8217;t solve this problem by putting those commands where they don&#8217;t belong. If you do, users likely will have to inspect every tab to find them—then promptly forget where they are.</p></blockquote>
<p>Yet every single office app has a &#8216;home&#8217; tab which is just a glorified &#8216;other stuff&#8217; which contains arbitrary stuff. But  even within the proper tabs things are of: What has recording macros to do with &#8216;view&#8217;? Why is stuff named &#8216;&#8230; layout&#8217; not in the &#8216;Page Layout&#8217;?</p>
<p>Even when the grouping of commands would have been done properly Microsoft did a great job at making searching the commands hard. With menus searching all items in the menus was really easy: Start with the first menu, go through it item by item. If an item is a submenu, continue with that submenu. When you finish a menu, go to the next menu. If you finish with a submenu, continue with the next item of the parent menu.</p>
<p>For the Ribbon the whole thing got way more difficult. First you scan the application menu. Don&#8217;t forget the two buttons in the application menu. Then iterate through the tabs scanning each toolbar within that tab, carefully checking the buttons for tiny triangles, which denote some combo box like control which hides even more commands. Ok scanning the cluttered toolbars, with text, icons in two sizes and all kinds of other controls is way slower than a nice list of commands/submenus but that isn&#8217;t too bad, isn&#8217;t it. Well it would be if we hadn&#8217;t missed 50% of the commands. Have a look at this partial screenshot.</p>
<p>Below the buttons and stuff is another grouping. It is completely useless since your eyes are coming from the tabs and get stuck between the buttons and controls before they notice, after a long search, that their search might have been easier if they had noticed the groups below first. What is more important is the tiny square with an arrow which is in some of the groups. It opens another dialog which sometimes looks like a menu and many actions are hidden in there.</p>
<p>So this is it, my rant about the Microsoft Ribbon Component. I actually don&#8217;t like rants. I like my blog posts to contain some useful stuff. So what are my recommendations?</p>
<p>If you plan to include a Ribbon in your next application think twice. It will look modern, but it will annoy users like me. You could make them happy with an option to replace the Ribbon with a more traditional UI. If you want to make users like me really happy make your menus searchable. In Java you can do that really easy with the <a href="http://www.pushing-pixels.org/?p=1046">substance look and feel</a> it creates a search box for searching the menus all on its own &#8230; really nice.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.schauderhaft.de/2009/01/08/the-ribbon-sucks/feed/</wfw:commentRss>
		<slash:comments>54</slash:comments>
		</item>
		<item>
		<title>A new Conference is born: SEACON</title>
		<link>http://blog.schauderhaft.de/2008/12/31/a-new-conference-is-born-seacon/</link>
		<comments>http://blog.schauderhaft.de/2008/12/31/a-new-conference-is-born-seacon/#comments</comments>
		<pubDate>Wed, 31 Dec 2008 06:39:19 +0000</pubDate>
		<dc:creator>Jens Schauder</dc:creator>
				<category><![CDATA[Kommunikation]]></category>
		<category><![CDATA[kurz notiert]]></category>
		<category><![CDATA[Softwareentwicklung]]></category>

		<guid isPermaLink="false">http://blog.schauderhaft.de/2008/12/31/a-new-conference-is-born-seacon/</guid>
		<description><![CDATA[There is a new conference taking place in 2009. You can find the call for paper here. Thing I find most promissing about it is: they actually try to use the quality of presentation technique for deciding on the selection of talks: Einreichungen, die alternative, partizipativere Formate verwenden, werden bevorzugt. Wenn die klassische Vortragsform gewählt [...]]]></description>
			<content:encoded><![CDATA[<p>There is a new conference taking place in 2009. You can find the <a href="http://www.sigs-datacom.de/sd/kongresse/seacon_2009/cfp.htm">call for paper here</a>. Thing I find most promissing about it is: they actually try to use the quality of presentation technique for deciding on the selection of talks:</p>
<blockquote><p>Einreichungen, die alternative, partizipativere Formate<br />
verwenden, werden bevorzugt. Wenn die klassische Vortragsform gewählt wird, dann sind<br />
uns auch hier unkonventionelle Stile lieber.</p></blockquote>
<p>(Proposals with an alternative participating format will be preferred. Even if a classical style is choosen a unconventional style is preferred)</p>
<p>Also the type of talks they are looking for sound interesting:</p>
<ul>
<li>Fishbowl &#8211; die für jedermann offene Podiumsdiskussion</li>
<li>Expertenbefragung</li>
<li>Blitzvortrag</li>
<li>Open Space</li>
</ul>
<p>Maybe we&#8217;ll see us at the conference that looks behind the buzzwords.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.schauderhaft.de/2008/12/31/a-new-conference-is-born-seacon/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

