<?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; audit</title>
	<atom:link href="http://blog.schauderhaft.de/tag/audit/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>Versioned Data</title>
		<link>http://blog.schauderhaft.de/2009/11/29/versioned-data/</link>
		<comments>http://blog.schauderhaft.de/2009/11/29/versioned-data/#comments</comments>
		<pubDate>Sun, 29 Nov 2009 10:15:33 +0000</pubDate>
		<dc:creator>Jens Schauder</dc:creator>
				<category><![CDATA[Softwaredevelopment]]></category>
		<category><![CDATA[audit]]></category>
		<category><![CDATA[history]]></category>
		<category><![CDATA[logging]]></category>
		<category><![CDATA[modeling]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[version]]></category>

		<guid isPermaLink="false">http://blog.schauderhaft.de/?p=330</guid>
		<description><![CDATA[In about one of two projects the customer comes up with the requirement of &#8216;historization&#8217; of data. And more often then not this lead to an unholy back and forth of discussions, prototypes and complaining. The reason for this as far as I can tell is: This is not a well defined requirement. It can [...]]]></description>
			<content:encoded><![CDATA[<div id="attachment_340" class="wp-caption alignleft" style="width: 310px"><a href="http://www.sxc.hu/photo/1214482"><img class="size-medium wp-image-340" title="1214482_77411415" src="http://blog.schauderhaft.de/wp-content/uploads/2009/11/1214482_77411415-300x225.jpg" alt="1214482_77411415" width="300" height="225" /></a><p class="wp-caption-text">Time Flies</p></div>
<p>In about one of two projects the customer comes up with the requirement of &#8216;historization&#8217; of data. And more often then not this lead to an unholy back and forth of discussions, prototypes and complaining. The reason for this as far as I can tell is: This is not a well defined requirement. It can mean many things, and depending on what is meant a different implementation is due. So here is my list of possible implementation approaches along with the circumstances in which they might be useful. Note: Back in the times when this blog was mostly German I wrote an article on the options of <a href="/2008/09/14/versionierte-vs-historisierte-objekte/">versioning or &#8216;historization&#8217;</a>. This article you you just read is basically a translated rerun of that article.</p>
<p><strong>Audit Trail</strong></p>
<p>The audit trail is the simplest of all approaches. When ever an object (or row in the database) changes, a copy of that object (row) gets stored in a separate table, together with a time stamp. This is so easy, it can be implemented with database tools alone, namely using triggers. With this approach it is fairly easy to identify the state of a given row at a given time. But it gets complicated to identify the same for a whole object graph, since the objects that are part of that object graph change at independent times. So you can&#8217;t just write a join. Also if you are not so much interested in the state of a row at a certain time, but at the changes that happen, the next approach might be more usefull to you.</p>
<p><strong>Change Log</strong></p>
<p>The Change Log is a variation of the audit trail. In both a record is produced on every change in a database row. But a change log, keeps track of the change, not so much of the state the row was in. So it would contain at least for the changed attributes the old and the new value. This way it gets easy to find out what kind of changes happen how often. A question often asked in data minining settings. Obviously you can and should fine tune your implementation between audit trail and change log to your exact needs.</p>
<p><strong>Snapshot</strong></p>
<p>In the Snapshot approach you take a snapshot of a complete object graph when an element of that graph changes. Note that now we are operation on objects and no longer on tables and rows. So there is no easy way to do this kind of thing in the database. Since you are creating copies of object graphs, you can navigate and query these graphs just as you can navigate and query the original graph. On the other hand the copies contain objects that didn&#8217;t change at all, so it is easy to end up with huge amounts of data fast.  Since these tables contain large amounts of duplicated data, compression might be really effective. Since you are creating the complete object graph for your history objects, nothing forces you to use the same model as with the live data. So your history schema might look very different.</p>
<p>All approaches so far are concerned with the past state of objects. But sometimes this isn&#8217;t enough. Sometimes what starts as &#8216;historization&#8217; ends up being full blown &#8230;</p>
<p>&#8230; <strong>Versioned Objects</strong></p>
<p>This is the most powerful approach: You model the versions i.e. the changing state of your objects as part of your domain model. Like so:</p>
<div class="geshi no java">
<div class="head">public class Thing {</div>
<ol>
<li class="li1">
<div class="de1"><span class="kw2">private</span> Set<span class="sy0">&amp;</span>lt<span class="sy0">;</span>thingversion<span class="sy0">&amp;</span>gt<span class="sy0">;</span>versions<span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw2">public</span> ThingVersion getVersion<span class="br0">&#40;</span><span class="kw3">Date</span> timestamp<span class="br0">&#41;</span><span class="br0">&#123;</span>&#8230;<span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="co1">// &#8230;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">public</span> <span class="kw2">class</span> ThingVersion <span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="kw2">private</span> <span class="kw3">Date</span> validFrom<span class="sy0">;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="co1">// &#8230;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p>Depending on the Context you might use references to the &#8216;Thing&#8217; or to a specific Version or to the version, which is valid at a specific point in time. Let me give you an example. When dealing with trains, a lot of rules have to get considered. Certain combination of good must not travel in wagons right next to each others. Wagons with certain goods have to have  certain features. And so on. These Rules change. And of course you need proof that the train you send on a track one year ago obeyed all the rules valid at that point in time. So far this sounds like a case for on of  the first three options. But when these rules change, you will get upfront notice of that change. But if you have a train that you plan for end of the month, which will obey the rules valid at that time, although it might violate rules which are in effect right now. In order to model this, you need Rules, that exist in Versions. And the train does reference that rule and uses it&#8217;s time of departure to request the appropriate rule version, which is valid at that day.</p>
<p>This will definitely make your model much more complex. So don&#8217;t use it if you don&#8217;t need to. But if you are dealing with planned changes this has proven to be a useful approach for me.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.schauderhaft.de/2009/11/29/versioned-data/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How to ask for a critique</title>
		<link>http://blog.schauderhaft.de/2009/08/30/how-to-ask-for-a-critique/</link>
		<comments>http://blog.schauderhaft.de/2009/08/30/how-to-ask-for-a-critique/#comments</comments>
		<pubDate>Sun, 30 Aug 2009 08:42:11 +0000</pubDate>
		<dc:creator>Jens Schauder</dc:creator>
				<category><![CDATA[Quality Management]]></category>
		<category><![CDATA[ask]]></category>
		<category><![CDATA[audit]]></category>
		<category><![CDATA[client]]></category>
		<category><![CDATA[critique]]></category>
		<category><![CDATA[feedback]]></category>
		<category><![CDATA[perspective]]></category>
		<category><![CDATA[review]]></category>

		<guid isPermaLink="false">http://blog.schauderhaft.de/?p=196</guid>
		<description><![CDATA[Des Traynor writes about how to get valuable feedback from your clients. He writes from a designer perspective, but the key points just as well apply for software developers, not only when talking to customers, but also when doing audits and reviews: Every time in my career that I’ve gotten useless feedback it has always [...]]]></description>
			<content:encoded><![CDATA[<p>Des Traynor writes about <a href="http://www.contrast.ie/blog/asking-for-feedback/">how to get valuable feedback</a> from your clients. He writes from a designer perspective, but the key points just as well apply for software developers, not only when talking to customers, but also when doing audits and reviews:</p>
<blockquote><p>Every time in my career that I’ve gotten useless feedback it has always been because I hadn’t asked for anything more. Attaching a file to an email and asking for any thoughts the client may have is a sure way to get any thoughts that the client may have.</p></blockquote>
<p>If you don&#8217;t want to start a brain storm about whatever you have created, ask specific questions. When you create mock gui the questions might be:</p>
<ul>
<li>Do the colors and layout match your Corporate Identity?</li>
<li> Are the most important elements easily accessible? How can we improve on that?</li>
<li> Should we make the fonts larger, smaller or keep them as they are?</li>
</ul>
<p>When doing a code review questions or tasks might be:</p>
<ul>
<li>Look for ill designed methods, that don&#8217;t work on a single level of abstraction, or aren&#8217;t properly named.</li>
<li>Is there anything that looks like a bug?</li>
<li>Is there anything that is difficult to understand and therefor needs refactoring or a comment?</li>
<li>Is there anything that might result in performance problems?</li>
</ul>
<p>It is also important to consider if you actually want feedback in order to improve the piece of work, or if you just want a confirmation that everything is Ok and you can consider it done. In the first case ask open questions: &#8220;What can we do to improve &#8230;?&#8221;, &#8220;What do you think about &#8230;?&#8221; If you just want to get an Ok ask closed question, that can be answered with yes or no: &#8220;Is &#8230; acceptable?&#8221;, &#8220;Do you agree &#8230;?&#8221;</p>
<p>Just in case you didn&#8217;t followed the link to <a href="http://www.contrast.ie/blog/">Des Traynors blog</a> you mist the hilarious video he included in the post, so let me add it here.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="344" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://www.youtube.com/v/sifESist1KY&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;hl=en&amp;feature=player_embedded&amp;fs=1" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="344" src="http://www.youtube.com/v/sifESist1KY&amp;color1=0xb1b1b1&amp;color2=0xcfcfcf&amp;hl=en&amp;feature=player_embedded&amp;fs=1" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.schauderhaft.de/2009/08/30/how-to-ask-for-a-critique/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

