<?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>Gridshore &#187; Uncategorized</title>
	<atom:link href="http://www.gridshore.nl/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gridshore.nl</link>
	<description>A weblog about software engineering, Architecture, Technology an other things we like.</description>
	<lastBuildDate>Tue, 13 Dec 2011 15:36:58 +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>Leaving JTeam joining Dutchworks</title>
		<link>http://www.gridshore.nl/2011/10/11/leaving-jteam-joining-dutchworks/</link>
		<comments>http://www.gridshore.nl/2011/10/11/leaving-jteam-joining-dutchworks/#comments</comments>
		<pubDate>Tue, 11 Oct 2011 19:48:20 +0000</pubDate>
		<dc:creator>jettro</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[dutchworks]]></category>
		<category><![CDATA[JTeam]]></category>

		<guid isPermaLink="false">http://www.gridshore.nl/?p=1206</guid>
		<description><![CDATA[<p>In this post I want to share something that just happened to me this week. On monday I started as usual for the past three years or so. At the end of the day I left JTeam behind and started working for Dutchworks. Ok, I am trying to be funny. It most probably is [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.gridshore.nl/wp-content/uploads/dutchworks_logo.jpg" alt="Dutchworks logo" title="dutchworks_logo" width="300" height="44" style="float:left"/>In this post I want to share something that just happened to me this week. On monday I started as usual for the past three years or so. At the end of the day I left JTeam behind and started working for Dutchworks. Ok, I am trying to be funny. It most probably is not working. Or are you smiling?</p>
<p>Enough of the fun part, now seriously. JTeam has outgrown it&#8217;s name. The past year a lot has changed and a new name is the next logical step. I cannot explain this better than my CEO Steven Schuurman. If you are interested you can read his announcement here:</p>
<p><a href="http://blog.dutchworks.nl/2011/10/10/hot-off-the-press-as-of-today-“jteam”-will-be-known-as-“dutchworks”/">http://blog.dutchworks.nl/2011/10/10/hot-off-the-press-as-of-today-“jteam”-will-be-known-as-“dutchworks”/</a></p>
<p>Head over to our new website: <a href="http://www.dutchworks.nl">http://www.dutchworks.nl</a>. Help us spread the word.</p>
<p>Hope to see you back when we write our next technical blog.</p>
<div class='dd_post_share'><div class='dd_buttons'><div class='dd_button'><iframe src='http://widgets.dzone.com/links/widgets/zoneit.html?url=http%3A%2F%2Fwww.gridshore.nl%2F2011%2F10%2F11%2Fleaving-jteam-joining-dutchworks%2F&amp;title=Leaving%20JTeam%20joining%20Dutchworks&amp;t=2' height='25' width='155' frameborder='0' scrolling='no'></iframe></div></div><div style='clear:both'></div></div><!-- Social Buttons Generated by Digg Digg plugin v4.5.3.4, 
    Author : Yong Mook Kim
    Website : http://www.diggdigg2u.com -->]]></content:encoded>
			<wfw:commentRss>http://www.gridshore.nl/2011/10/11/leaving-jteam-joining-dutchworks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Documents the Pull Way</title>
		<link>http://www.gridshore.nl/2011/09/01/documents-the-pull-way/</link>
		<comments>http://www.gridshore.nl/2011/09/01/documents-the-pull-way/#comments</comments>
		<pubDate>Thu, 01 Sep 2011 19:48:15 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.gridshore.nl/2011/09/01/documents-the-pull-way/</guid>
		<description><![CDATA[<p>Today I came across a column posted (in Dutch) on Webwereld entitled &#34;It&#8217;s a trap!&#34;. This column is responding to the recent decision at a LibreOffice/OpenOffice Workshop to put more effort into support for Microsoft&#8216;s proprietary OOXML format.</p> <p>Perhaps it is because I have been reading Pull. Perhaps it is because I have been [...]]]></description>
			<content:encoded><![CDATA[<p>Today I came across a column posted (in Dutch) on <a href="http://webwereld.nl/" title="Webwereld" target="_blank">Webwereld</a> entitled &quot;<a href="http://webwereld.nl/column/107786/its-a-trap---column-.html" title="It's a trap! (column)" target="_blank">It&#8217;s a trap!</a>&quot;. This column is responding to the <a href="http://www.osor.eu/news/support-for-proprietary-ooxml-format-spurs-open-source-suites-adoption" target="_blank">recent decision</a> at a LibreOffice/OpenOffice Workshop to put more effort into support for <a href="http://www.microsoft.com" title="Microsoft" target="_blank">Microsoft</a>&#8216;s proprietary <a href="http://en.wikipedia.org/wiki/Office_Open_XML" title="Office Open XML" target="_blank">OOXML</a> format.</p>
<p>Perhaps it is because I have been reading <a href="http://www.amazon.com/Pull-Power-Semantic-Transform-Business/dp/B00403NG2C/" title="Pull: The Power of the Semantic Web to Transform Your Business" target="_blank">Pull</a>. Perhaps it is because I have been working at a new company over the past year who are trying to address some related issues. But this column got me thinking about what the essence is of what we call documents nowadays and how this might change in the coming years.</p>
<p><span id="more-1188"></span><br />
<h1>It&#8217;s a trap! in short&#8230;</h1>
<p>For those of you who do not read Dutch, the point of the original column &quot;It&#8217;s a trap&quot; is that word processors as they are nowadays are simply a continuation of the evolution of the paper document, from clay tablet to an electronic view on preparing documents for printing on static paper. However, the author states, documents are moving more and more to being electronic entities living primarily on computers, independent of the static form of the paper document. In light of this he is surprised that the LibreOffice community wants to concentrate on adopting the &quot;enemy&quot; document format and try to challenge Microsoft on its own homeground, when that is just playing to Microsoft&#8217;s strength rather than trying to pull ahead of them in the area of the location- and medium independent document that just lives in the cloud.</p>
<h1>Semantic web</h1>
<p>Like I mentioned earlier, I&#8217;ve been working for a new company for the past year. This <a href="http://www.qiy.com" target="_blank">company</a> is trying to embrace part of the vision of the <a href="http://en.wikipedia.org/wiki/Semantic_Web" target="_blank">semantic web</a> as put forth in books like <a href="http://thepowerofpull.com/siegel/thoughts/who-is-the-worlds-first-blogger" target="_blank">David Siegel</a>&#8216;s Pull. As part of this new job I&#8217;ve been able to spend time thinking about the vision of Pull and how reversing the current model of interaction between companies and consumers will affect the way we think about personal data and data sharing.</p>
<p>The basic idea behind the semantic web is that it must be possible to interpret the meaning of (textual) resources and the relationships to other resources automatically and unambiguously. To that end these relationships are described formally in a (the?) semantic web, enabling software to reason about these relationships according to preset rules in order to deliver value to human users of the software.</p>
<p>Once you start thinking about it, the consequence of building and using a semantic web is that data is not the only thing that is important any more. In addition to data (which exists for human interpretation and consumption), formally formed data <em>about</em> data is very important: the <strong><em><u>metadata</u></em></strong>. This metadata, like a formal description of relationships, describes what data is about in a way that can be understood by machines. Metadata is what enables automated processing of data and as the amount and richness of metadata increases and is linked together in a semantic web, the more it will enable smart(er) software to process data in new and unusual ways. It will enable software to discover data in the cloud and even generate new data by combining existing data through actual understanding of that data.</p>
<h1>It&#8217;s a document, but not as we know it</h1>
<p>So when is a datum data and when is it metadata? That&#8217;s a good question. The answer is that it depends. Data is intended for humans and metadata for computers&#8230; but why shouldn&#8217;t humans know who the sender of an email is, just because that information is metadata? Or the other way around, why shouldn&#8217;t a computer try to make some sense of data, or try to perform some processing of data, just because the primary audience is human? Search engines do exactly that&#8230;</p>
<p>The upshot of it is that data can be data and can be metadata interchangeably, depending on the context. In other words, the role of data is not fixed but depends on how you happen to be treating it. Nothing new there, of course. Which is when I came across that column.</p>
<p>The column raises the question of whether LibreOffice should try to follow the OOXML format when the very nature of document storage and presentation is changing. That&#8217;s a good point, but in the light of the semantic web it&#8217;s not going far enough. Since data can be both data and metadata and metadata enables processing (such as presentation), I say the real question is: what is a document?</p>
<p>The point of a file format like the .DOC or the .DOCX formats is that they contain document data (i.e. contents), what users consider metadata (i.e. properties like the author), and application-specific metadata pertaining to the way applications are supposed to present data. All very nice and useful. But one of those three categories is only useful to applications that want to present the content exactly the way Word does. An application that wants to apply different formatting, or wants to read the contents out loud, or wants to do something completely different than presenting the contents on-screen or on paper is not interested in the Word instructions at all.</p>
<p>So here&#8217;s a question: what is really a document? Is it a file on a storage medium? Or is it just the contents and the application-independent metadata? Is it in any way interesting to include presentation hints in a document? After all, if you follow the visions of data pull and the semantic web, real value comes from making data application-agnostic and allowing each application to overlay any presentation that fits its purposes.</p>
<p>And that is the direction I think documents will start following more and more. Even in the original Web 1.0 the intention already existed that data only be described and display be left to the user agent. After having veered off the path in HTML 3 and 4, the web is now morphing into the transport medium for a worldwide system of applications forming (partially) dynamic SOA networks, whose entire possibility of existence is based on being able to process raw data without having to wade through superfluous bytes that are specific to one particular application. Application networks like that are based on location-agnostic data with plenty of application-independent metadata to allow for all sorts of processing without binding to a specific application.</p>
<p>So I think that in the future our notion of a document will change completely. I think that we will move to a separation of content and semantic data from anything else, meaning that we will be divorcing documents from the applications that process them. We will even divorce documents from presentation forms and formats, so that the distinction between a Word document, a PDF, a spreadsheet, a (NoSQL) database of facts and relations, an MP3 recording of the contents and a steganographic encoding of some piece of abstract art will vanish and the informational content of the document will depend only on the application doing the processing (note that &quot;informational content&quot; is not the same as &quot;semantics&quot;).</p>
<h1>Oh, by the way&#8230;</h1>
<p>The column that inspired this blog was wondering whether or not the LibreOffice community should invest effort in becoming (more) compatible with the OOXML format and so emulate MS Office. Contrary to what you might be thinking, I feel that the answer given by that column is wrong. Not that I think that the goal should be to become fully OOXML-compatible, because I do feel the very notion of &quot;document&quot; and &quot;document format&quot; should change. But in the world that I think we are moving towards, the value of an application will not be in its compatibility with one data format but in how much value it creates for a user in the way it interprets and (re)processes the basic data and metadata.</p>
<p>So how does this relate to LibreOffice and their OOXML compatibility? Well, LibreOffice could stand to start offering more value as an office suite. Simply put, LibreOffice sucks as an office suite. It wasn&#8217;t so bad when Microsoft Office was still in the pre-2007 releases and documents from MS Office sucked in the same way as those from OpenOffice. But with Office 2007, Microsoft took a huge leap ahead of all the alternatives out there. And the difference isn&#8217;t in any technical improvement they made either; Microsoft didn&#8217;t add any great new technical functionalities, any huge new editing or DTP facilities or anything to do with the document <em>content</em>. But they did invest a lot in a number of document looks and feels (designed by graphics designers) that make it possible to create good-looking documents very simply (i.e. to present the content in an attractive way with little effort). A vast improvement over documents from other Office suites (including earlier versions of MS Office), which produced documents whose appearance sucked unless you put in A LOT of effort. In other words, Microsoft put a lot of effort into how they processed and presented the basic content of each file and so added a lot of value for the end user rather than adding useless functionality that nobody needs like they did in earlier releases. Their concentration on adding this value means MS Office is now a far better document processor than LibreOffice. And in that sense, yes, the LibreOffice community should definitely try to emulate Microsoft Office far more than it is doing now. Not for the document format, but for the value the office suite adds as a document interpreter.</p>
<div class='dd_post_share'><div class='dd_buttons'><div class='dd_button'><iframe src='http://widgets.dzone.com/links/widgets/zoneit.html?url=http%3A%2F%2Fwww.gridshore.nl%2F2011%2F09%2F01%2Fdocuments-the-pull-way%2F&amp;title=Documents%20the%20Pull%20Way&amp;t=2' height='25' width='155' frameborder='0' scrolling='no'></iframe></div></div><div style='clear:both'></div></div><!-- Social Buttons Generated by Digg Digg plugin v4.5.3.4, 
    Author : Yong Mook Kim
    Website : http://www.diggdigg2u.com -->]]></content:encoded>
			<wfw:commentRss>http://www.gridshore.nl/2011/09/01/documents-the-pull-way/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Axon Framework 1.0 released!</title>
		<link>http://www.gridshore.nl/2011/04/19/axon-framework-1-0-released/</link>
		<comments>http://www.gridshore.nl/2011/04/19/axon-framework-1-0-released/#comments</comments>
		<pubDate>Tue, 19 Apr 2011 06:13:49 +0000</pubDate>
		<dc:creator>Allard</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.gridshore.nl/2011/04/19/axon-framework-1-0-released/</guid>
		<description><![CDATA[<p>It has been an exciting year. Little over a year ago, I started developing a framework to make it easier for developers to implement a highly scalable en extensible architecture. The first public Axon release (0.3) came out in April 2010, and was far from feature complete. Now, almost a year later, Axon has [...]]]></description>
			<content:encoded><![CDATA[<p>It has been an exciting year. Little over a year ago, I started developing a framework to make it easier for developers to implement a highly scalable en extensible architecture. The first public Axon release (0.3) came out in April 2010, and was far from feature complete. Now, almost a year later, Axon has proven to be production ready and has been successfully employed in several projects around the world.</p>
<p><a href="http://blog.jteam.nl/2011/04/19/axon-framework-1-0-released/">Continue reading…</a> (full article published on <a href="http://blog.jteam.nl/2011/04/19/axon-framework-1-0-released/">blog.jteam.nl</a>)</p>
<div class='dd_post_share'><div class='dd_buttons'><div class='dd_button'><iframe src='http://widgets.dzone.com/links/widgets/zoneit.html?url=http%3A%2F%2Fwww.gridshore.nl%2F2011%2F04%2F19%2Faxon-framework-1-0-released%2F&amp;title=Axon%20Framework%201.0%20released%21&amp;t=2' height='25' width='155' frameborder='0' scrolling='no'></iframe></div></div><div style='clear:both'></div></div><!-- Social Buttons Generated by Digg Digg plugin v4.5.3.4, 
    Author : Yong Mook Kim
    Website : http://www.diggdigg2u.com -->]]></content:encoded>
			<wfw:commentRss>http://www.gridshore.nl/2011/04/19/axon-framework-1-0-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Axon Framework 1.0, first release candidate available</title>
		<link>http://www.gridshore.nl/2011/02/16/axon-framework-1-0-first-release-candidate-available/</link>
		<comments>http://www.gridshore.nl/2011/02/16/axon-framework-1-0-first-release-candidate-available/#comments</comments>
		<pubDate>Wed, 16 Feb 2011 10:32:16 +0000</pubDate>
		<dc:creator>Allard</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Axon Framework]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://www.gridshore.nl/2011/02/16/axon-framework-1-0-first-release-candidate-available/</guid>
		<description><![CDATA[<p>The Axon Framework 1.0 release is closing in. After over a year of development, all features planned for the 1.0 version are included. With the latest added features, Axon has become a powerful framework that helps developers implementing applications using on a CQRS based architecture.</p> <p>Although the 1.0-rc1 version doesn’t add a lot of [...]]]></description>
			<content:encoded><![CDATA[<p>The Axon Framework 1.0 release is closing in. After over a year of development, all features planned for the 1.0 version are included. With the latest added features, Axon has become a powerful framework that helps developers implementing applications using on a CQRS based architecture.</p>
<p>Although the 1.0-rc1 version doesn’t add a lot of new features to the previous release (0.7), it does represent a major milestone in Axon’s lifecycle. If Axon continues to prove it works as expected in production environments, the final 1.0 release can be expected before summer. Meanwhile, development will start on the remote messaging components required for scalability in larger systems.</p>
<p><a href="http://blog.jteam.nl/2011/02/16/axon-framework-1-0-first-release-candidate-available/" target="_blank">Read the entire entry on the JTeam blog</a>.</p>
<div class='dd_post_share'><div class='dd_buttons'><div class='dd_button'><iframe src='http://widgets.dzone.com/links/widgets/zoneit.html?url=http%3A%2F%2Fwww.gridshore.nl%2F2011%2F02%2F16%2Faxon-framework-1-0-first-release-candidate-available%2F&amp;title=Axon%20Framework%201.0%2C%20first%20release%20candidate%20available&amp;t=2' height='25' width='155' frameborder='0' scrolling='no'></iframe></div></div><div style='clear:both'></div></div><!-- Social Buttons Generated by Digg Digg plugin v4.5.3.4, 
    Author : Yong Mook Kim
    Website : http://www.diggdigg2u.com -->]]></content:encoded>
			<wfw:commentRss>http://www.gridshore.nl/2011/02/16/axon-framework-1-0-first-release-candidate-available/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Axon Framework 0.7 Released</title>
		<link>http://www.gridshore.nl/2011/01/05/axon-framework-0-7-released/</link>
		<comments>http://www.gridshore.nl/2011/01/05/axon-framework-0-7-released/#comments</comments>
		<pubDate>Wed, 05 Jan 2011 13:14:48 +0000</pubDate>
		<dc:creator>Allard</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.gridshore.nl/2011/01/05/axon-framework-0-7-released/</guid>
		<description><![CDATA[<p>Today, I released the 0.7 version of Axon Framework. A lot has happened since 0.6, and that’s why it took a little longer for this version to come out. This new version is a huge step towards the 1.0, of which the first milestone release should be available before March 2011. All basic building [...]]]></description>
			<content:encoded><![CDATA[<p>Today, I released the 0.7 version of Axon Framework. A lot has happened since 0.6, and that’s why it took a little longer for this version to come out. This new version is a huge step towards the 1.0, of which the first milestone release should be available before March 2011. All basic building blocks that you need to run a CQRS application have been implemented. </p>
<p>0.7 offers a large number of new features, such as support for Sagas, Event versioning, Spring Namespace Configuration, and many others, which I will describe in more detail.</p>
<p><a href="http://blog.jteam.nl/2011/01/05/axon-framework-0-7-released/" target="_blank">Continue reading…</a>&#160; <br />(the entire post is published on blog.jteam.nl)</p>
<div class='dd_post_share'><div class='dd_buttons'><div class='dd_button'><iframe src='http://widgets.dzone.com/links/widgets/zoneit.html?url=http%3A%2F%2Fwww.gridshore.nl%2F2011%2F01%2F05%2Faxon-framework-0-7-released%2F&amp;title=Axon%20Framework%200.7%20Released&amp;t=2' height='25' width='155' frameborder='0' scrolling='no'></iframe></div></div><div style='clear:both'></div></div><!-- Social Buttons Generated by Digg Digg plugin v4.5.3.4, 
    Author : Yong Mook Kim
    Website : http://www.diggdigg2u.com -->]]></content:encoded>
			<wfw:commentRss>http://www.gridshore.nl/2011/01/05/axon-framework-0-7-released/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Public Transportation pass woes&#8230;.</title>
		<link>http://www.gridshore.nl/2010/08/19/public-transportation-pass-woes/</link>
		<comments>http://www.gridshore.nl/2010/08/19/public-transportation-pass-woes/#comments</comments>
		<pubDate>Thu, 19 Aug 2010 19:21:13 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.gridshore.nl/2010/08/19/public-transportation-pass-woes/</guid>
		<description><![CDATA[<p>The Netherlands is currently in the middle of a large project to change the way we pay for public transportation. We are moving from paying with a cardboard strip (called the &#34;Nationale Strippenkaart&#34;, which must be stamped by the driver of the public transportation vehicle you get on) to a new system (the OV-chipkaart) [...]]]></description>
			<content:encoded><![CDATA[<p>The Netherlands is currently in the middle of a large project to change the way we pay for public transportation. We are moving from paying with a cardboard strip (called the &quot;<a href="http://nl.wikipedia.org/wiki/Nationale_Strippenkaart">Nationale Strippenkaart</a>&quot;, which must be stamped by the driver of the public transportation vehicle you get on) to a new system (the <a href="http://en.wikipedia.org/wiki/OV-chipkaart">OV-chipkaart</a>) involving an RFID chip on which you can preload money or one or more subscriptions. The idea is not new (the Greater London <a href="http://en.wikipedia.org/wiki/Oyster_card">Oyster Card</a> is a well-know example) but this is the first time I know of that it has been done on a nationwide scale.</p>
<p>Needless to say there have been problems along the way. <a href="http://michelvaneeten.nl/">Michel van Eeten</a>, professor of Governance of Infrastructures at the <a href="http://www.tudelft.nl">Delft University of Technology</a>, recently gave an interview to the Dutch engineering magazine <a href="http://www.deingenieur.nl">De Ingenieur</a> in which he explained how the project is suffering from an implicit choice of offloading all of the project risks (security, privacy, and so on) onto the customer. A few days ago I had a similar experience with problem offloading onto the public by this project&#8230;</p>
<p><span id="more-1074"></span><br />
<h3>Some background</h3>
<p>Before I get into the problem itself, let me give you some background on the setup that <a href="http://www.translink.nl/content.asp?languageID=UK&amp;pageID=1">Trans Link Systems</a> (the executive organization behind the new system) has come up with. The idea behind the new OV-chipkaart is to replace the old Nationale Strippenkaart as a single method of payment for all public transportation services. This means that you must be able to wave your card in front of a machine at any train station, bus stop, tram stop, metro station and so on and be able to check in for travel or check out for payment (you then get charged based on distance traveled). Privacy laws in The Netherlands being what they are, each company must keep track of its own interactions with the passenger/customer, so a shared administrative database is out (meaning also that if you want to transfer from one company to another you must check out and check in again at a different sign-in point at the same station).</p>
<p>At the same time the government doesn&#8217;t want a monopoly on any part of the equipment, so the check-in/check-out hardware cannot be standardized to one offering by one company. Instead there is a general communications standard between the RFID chip (which is a MiFare chip supplied by <a href="http://www.nxp.com">NXP Semiconductors</a> &#8212; the government agreed to a monopoly on that part) and the devices and between the devices and the public transportation operators. Trans Link Systems ties the machines together through a shared network infrastructure and also maintains a database of all transportation data (separate from the data kept by the individual companies) in order to deal with system difficulties, fraud and so on. In other words, Trans Link Systems is running a huge <a href="http://en.wikipedia.org/wiki/Enterprise_service_bus">ESB</a> with a monitoring system.</p>
<p>To reiterate, the idea behind all of this is to replace the existing Nationale Strippenkaart with the same level of service or better.</p>
<h3>Where things started going wrong</h3>
<p>As is often the case with huge projects that are forced on a large entity from above (a company by management or a country by the government), the problem with the OV-chipkaart project is not in the technology itself but in the interaction with the potential user base. There has been a lot to do in The Netherlands over the past few months about privacy and security involving this system. I won&#8217;t get into all of that, save to say (as mentioned before) that professor van Eeten has given a nice interview to the Ingenieur in which he points out that most of the problems are the result of some stupid choices by Trans Link Systems which boil down to dropping problems in the lap of the passengers rather than dealing with them themselves. These choices serve to lower trust in the system and the people behind it and increase the height of the hurdle to be taken in convincing people to switch.</p>
<p>Case in point is what happened to my mother a few days ago. My mother has had an OV-chipkaart for several months, which she ordered through the bus company (my mother travels by bus mostly, so that&#8217;s where she chose to order her card; all the cards use the same MiFare chip, but the cards themselves are supplied by many different companies and can either be anonymous or personalized). She doesn&#8217;t use it often because she is entitled to ride for free on the inner city buses, but she needs one for regional buses and the once-in-a-blue-moon train ride.</p>
<p>Last Monday was one of those blue-moon occasions. We took the bus to the station together and then she tried to check in for the train — and was promptly refused. Several attempts, no success. Finally I bought her an old-fashioned return ticket (say what you want about that paper stuff, it definitely <em>works</em>). On the way back we stopped in at the bus company to complain, who told us they couldn&#8217;t see what was up with railway payments on their machines and told us to go to the railway company (who, luckily, had an office in the same station). So we trudged over there and the railway <s>bitch</s> not-very-nice-person at the desk snippily informed us that my mother&#8217;s card was not equipped for the train. In order to use the train she first had to go online to order a special train subscription for not-railway-issued OV-chip cards (which was needed for the sole purpose of determining which class she wanted to travel in), which would then have to be loaded onto her card using one of the machines back at the station. And processing an order for such a subscription takes an hour, so even if you have a smartphone with Internet access and can order the thing right there it does you no good unless you want to hang around the station for an hour, thank you very much.</p>
<h3>QoS or JPS?</h3>
<p>Now, I&#8217;m not quite sure what I&#8217;m complaining about in this blog but it&#8217;s either a lack of QoS (Quality of Service) or an excess of JPS (Just Plain Stupid). Either way, it&#8217;s a case of what Van Eeten was talking about in his interview: offloading responsibility from the service provider onto the customer making the system difficult to use and lowering acceptance.</p>
<p>Sure, it doesn&#8217;t sound so bad to have to get a special subscription for the train (it&#8217;s free, you just pay for using the train) and having to wait an hour. And the reasoning even sounds reasonable (after all, the railways must know what class you will be traveling in in order to know what to charge you). But here&#8217;s the point: the public transportation providers and the government decided to change the payment system without consulting the traveling public and must therefore convince the public to switch <em>and they&#8217;re offering a lower level of service than the old system while doing this</em>.</p>
<p>Really, they are. I said it earlier and I&#8217;ll repeat it here: say what you want about that paper stuff, but it definitely works. And that&#8217;s what people are used to. You buy a single ticket and then you&#8217;re good to go. And that&#8217;s the level of service that the new system must meet at the very least. Without that the hurdle is too high for the public and acceptance will be low and grudging. After all, you must realize (which Trans Link doesn&#8217;t seem to) that the public to convince is <u>the general public</u>. And that general public is being asked to make changes in what it is used to. For starters, the public is being asked to move from the following process:</p>
<ol>
<li>Go to stop/station.</li>
<li>Get on board.</li>
<li>Present ticket for stamping.</li>
<li>Travel.</li>
</ol>
<p>to this one:</p>
<ol>
<li>Go to stop/station.</li>
<li>Get on board.</li>
<li>Present ticket for check in.</li>
<li>Travel.</li>
<li>Present ticket for check out.</li>
</ol>
<p>That&#8217;s only a single extra step, but for most of the general public that&#8217;s already pushing the limit of what you can ask of a person. If the card itself is difficult to handle on top of that, that&#8217;s a risk to the success of the system.</p>
<h3>So what to do?</h3>
<p>Compare the situation sketched above to that of the mobile phone (which I&#8217;m intimately aware of just now, having just switched <img src='http://www.gridshore.nl/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  ). For that you need some sort of subscription from a telecom provider and a phone (call it a card with a MiFare chip). Many providers provide some network services in addition to voice communication (like voicemail, SMS, MMS). For those you usually get pushed configurations the first time you sign in on the network. In addition most phones offer additional services (like email) which you must configure. But whether they do or not: your basic network services work the moment you put your SIM-card in the phone. Easy-peasy, Japaneasy. </p>
<p>The phone situation is so normal that you might have missed the point: <em>the basic network services work immediately.</em> No extra work or configuration required. Extra stuff like email needs configuration, but the basics are plug-and-play.</p>
<p>So why doesn&#8217;t the OV-chipkaart work like that? Why didn&#8217;t they make it so that you can use all public transportation in the lowest class the moment you have the card? Sure, if you want to travel in a higher class you would have to do something extra, but at least travel would be possible immediately. Why was it necessary to push the problem of getting basic service working off onto the passengers? That&#8217;s Just Plain Stupid, all the way. Not to mention <a href="http://www.gridshore.nl/2008/03/29/how-wtfs-improve-code-quality-awareness/">WTF</a>&#8230;</p>
<h3>Are you kidding me?</h3>
<p>Just as an aside, here&#8217;s an interesting question for you: how do you think tourists are supposed to get around using the new system? Tourists have to rely on the anonymous, prepaid, disposable cards that you buy at station bookstores and magazine stands. Available all over the place and no privacy concerns, for the ease of use of the hapless visitor to our country. And just to add insult to injury, <em>those</em> cards allow you to check in to any mode of transportation in the lowest class available automatically.</p>
<p><em>Update (05-09-2010): Since writing this blog, I have purchased an anonymous pass from the Railway Service and it has turned out that I have completely maligned them in the area of not being consistent in the treatment of personal and anonymous passes. As it turns out, you must also get a special train subscription as explained above for an anonymous pass, even if you purchase it directly from the Railway Service. So it&#8217;s equally inconvenient for everybody and tourists are just as screwed as everybody else. My apologies to the Railway Service for misrepresenting the situation.</em></p>
<div class='dd_post_share'><div class='dd_buttons'><div class='dd_button'><iframe src='http://widgets.dzone.com/links/widgets/zoneit.html?url=http%3A%2F%2Fwww.gridshore.nl%2F2010%2F08%2F19%2Fpublic-transportation-pass-woes%2F&amp;title=Public%20Transportation%20pass%20woes....&amp;t=2' height='25' width='155' frameborder='0' scrolling='no'></iframe></div></div><div style='clear:both'></div></div><!-- Social Buttons Generated by Digg Digg plugin v4.5.3.4, 
    Author : Yong Mook Kim
    Website : http://www.diggdigg2u.com -->]]></content:encoded>
			<wfw:commentRss>http://www.gridshore.nl/2010/08/19/public-transportation-pass-woes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>CQRS &#8211; Designing domain events</title>
		<link>http://www.gridshore.nl/2010/01/27/cqrs-designing-domain-events/</link>
		<comments>http://www.gridshore.nl/2010/01/27/cqrs-designing-domain-events/#comments</comments>
		<pubDate>Wed, 27 Jan 2010 11:33:31 +0000</pubDate>
		<dc:creator>Allard</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Architecture]]></category>
		<category><![CDATA[Axon Framework]]></category>
		<category><![CDATA[cqrs]]></category>
		<category><![CDATA[DDD]]></category>

		<guid isPermaLink="false">http://www.gridshore.nl/2010/01/27/cqrs-designing-domain-events/</guid>
		<description><![CDATA[<p> Command-Query Responsibility Segregation (CQRS) is slowly but steadily gaining ground as an architecture that helps developers to develop scalable, extensible and maintainable applications. Events play a major role in this architecture, and the way you design these events greatly influence the extensibility of your application.</p> <p>In this post, I describe some CQRS event [...]]]></description>
			<content:encoded><![CDATA[<p><a title="AxonFramework logo" href="http://www.axonframework.org" target="_blank"><img style="border-right-width: 0px; margin: 5px 10px 10px 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="logo" border="0" alt="logo" align="left" src="http://www.gridshore.nl/wp-content/uploads/logo.png" width="100" height="100" /></a> Command-Query Responsibility Segregation (CQRS) is slowly but steadily gaining ground as an architecture that helps developers to develop scalable, extensible and maintainable applications. Events play a major role in this architecture, and the way you design these events greatly influence the extensibility of your application.</p>
<p>In this post, I describe some CQRS event basics and design considerations that help keep your application extensible.</p>
<p>The full post is published on the JTeam blog. Continue to read here: <a title="http://blog.jteam.nl/2010/01/27/cqrs-designing-domain-events/" href="http://blog.jteam.nl/2010/01/27/cqrs-designing-domain-events/">http://blog.jteam.nl/2010/01/27/cqrs-designing-domain-events/</a></p>
<div class='dd_post_share'><div class='dd_buttons'><div class='dd_button'><iframe src='http://widgets.dzone.com/links/widgets/zoneit.html?url=http%3A%2F%2Fwww.gridshore.nl%2F2010%2F01%2F27%2Fcqrs-designing-domain-events%2F&amp;title=CQRS%20%26ndash%3B%20Designing%20domain%20events&amp;t=2' height='25' width='155' frameborder='0' scrolling='no'></iframe></div></div><div style='clear:both'></div></div><!-- Social Buttons Generated by Digg Digg plugin v4.5.3.4, 
    Author : Yong Mook Kim
    Website : http://www.diggdigg2u.com -->]]></content:encoded>
			<wfw:commentRss>http://www.gridshore.nl/2010/01/27/cqrs-designing-domain-events/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The year 2009</title>
		<link>http://www.gridshore.nl/2009/12/27/the-year-2009/</link>
		<comments>http://www.gridshore.nl/2009/12/27/the-year-2009/#comments</comments>
		<pubDate>Sun, 27 Dec 2009 10:17:15 +0000</pubDate>
		<dc:creator>jettro</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[2009]]></category>
		<category><![CDATA[recap]]></category>

		<guid isPermaLink="false">http://www.gridshore.nl/?p=972</guid>
		<description><![CDATA[<p>The year 2009 is almost over. In good tradition, this post is a recap of what happened to gridshore in this year. I will discuss new technologies as discussed on gridshore.nl. I&#8217;ll also talk about important things happened this year on a professional level to myself.</p> <p> January <p>January was a month with a [...]]]></description>
			<content:encoded><![CDATA[<p>The year 2009 is almost over. In good tradition, this post is a recap of what happened to gridshore in this year. I will discuss new technologies as discussed on gridshore.nl. I&#8217;ll also talk about important things happened this year on a professional level to myself.</p>
<p><span id="more-972"></span><br />
<h2>January</h2>
<p>January was a month with a lot of activity on gridshore. Allard wrote an article about Spring DM server. I wrote my first blog about springsource entering the flex domain. I learned about the flex actionscript project and the Spring BlazeDS integration project. I wrote additional posts on this flex integration and made my books-overview sample a lot easier. I also wrote about Hippo and how to interact with hippo using a spring component. The connector made use of the CircuitBreaker pattern. Still nice to see that it actually worked to make a more stable interaction solution between the component and an external repository. Ben wrote a very nice post about software design. He used the <strong>Parable of the lightbulb</strong> to explain some facets of software engineering.</p>
<p>At the end of January Allard started writing about Domain Driven Design. This was an important start of something that got a lot more attention in 2009.</p>
<h2>February</h2>
<p>February was a very quiet month. Just one post from Freddie to start a discussion about the use of flex in applications.</p>
<h2>March</h2>
<p>I was to only one to write some posts. Of course there was a flex post, a new milestone release of the spring blazeds integration project was available. I wrote about the upgrade process.</p>
<p>Another post I wrote was about using the Hippo or JackRabbit event mechanism. We used this mechanism in a project to feed a solr instance with new and updated content from hippo. Another post that is nice to mention is the post about reading an rss feed using spring integration. This was the first step in looking more into spring integration and there was more to com in 2009. I ended up using spring integration in a big project for importing content into the hippo content repository.</p>
<h2>April</h2>
<p>Ben wrote two nice posts with lessons about re-invention and the impact Dijkstra has on computing. I wrote my first article on google app engine that now supports java. I used intellij to create the application.</p>
<p>Another post I created was dealing with flex, BlazeDS and Active MQ. This blog was read a lot and gained a lot of traffic. It is about the first step in a server push to clients of changes made on the server.</p>
<h2>May</h2>
<p>Was a month of references to posts on other websites, I started blogging on my employers website as well, about content management. Freddie wrote something on the computable website about XML and Ben referred to a blog post from someone else about slow java.</p>
<p>In may I also the post that was the most read post created in 2009. All other posts in the top 10 of most read posts were from 2008 or even earlier. This was the post about integrating spring security in BlazeDS and use Mate on the client. I still think it is to bad the Mate community (which is very small I am afraid) did not pick this up.</p>
<h2>June</h2>
<p>A very divers month for me. I wrote a post about the google analytics API and a post about serving static files from google app engine. This post has become obsolete with new versions of google app engine.</p>
<p>Another interesting post was about my first journey with Spring roo. Kind of funny to see that in the beginning this post was very high in google search results. A lot of people read it, but I was not very positive. I think the guys from the room team picked it up very well and gave some good comments. Hope to have a new look at it in 2010.</p>
<h2>July</h2>
<p>This was actually the month of Allard. He wrote more in the Domain Driven Design context. Two posts about the repository interface and the equals method.</p>
<p>July was also the month Allard and myself went to New York to attend a domain driven design training from Eric Evans. Inspired by the new york user group, Allard and I started the DDDNL user group. We spend some time in 2009 to start up this group. We had to meetings and we will have 6 in 2010.</p>
<h2>August</h2>
<p>Again a post from Ben in a way only Ben can write it. This time about upgrading his windows machine. I wrote my first real post about Domain Driven Design. Not a lot of code, but focussed on what it is and why implementers should want to use it.</p>
<h2>September</h2>
<p>An excellent blog post from Ben about Bad Science. This post got a very funny comment from someone doing advertising for plastic bottles. Very funny.</p>
<p>I wrote two blog posts this month, one about monitoring your spring application using the Beet framework. Based on some requirements I had for a new project &#8220;Your Scrum&#8221; I continued my jQuery journey. I wanted to have a screen with a sortable list of backlog items. This turned out to be a serious challenge, but when finished I had a nice solution on the front end as well as the backend.</p>
<p>In september we also had our kick-off meeting for the DDDNL user group.</p>
<h2>October</h2>
<p>The month of Ben. He wrote two posts. One about using the java reflection api, the other about stuff you can do with Outlook. A blog post about Visual Basic on gridshore?</p>
<h2>November</h2>
<p>November is about groovy and grails. I attended the Groovy and Grails training from Springsource by Peter ledbrook. This was a very inspiring training and I was surprised by the steps grails has taken since the last time I used it.</p>
<p>For a project I created a small application which is hosted at github. This application was written with grails. In November I also gave a presentation for the NLJug about google app engine. During this presentation I did a live demo of a grails application that was hosted on google app engine.</p>
<p>The second post this month was a bout Groovy. I wrote a blog post about generating a graph with results from the beet monitoring framework. It was amazed by the power of groovy, what took me 10 minutes was estimated by other to take about half a day in java.</p>
<h2>December</h2>
<p>Allard started his open source framework around Command Query Responsibility segragation. The framework is called CQRS4j.</p>
<p>I wrote a post about starting with grails. This was a milestone post for me. We usually post our blog posts on DZone. We get a lot of traffic through them en often a number of up-votes. For this post I reached the 25 up-posts level. Which makes this a big post according to DZone. The post itzelfs is about an application I am creating using grails. The application deals with some scheduling requests we have to plan what people are going to do the next week.</p>
<h2>2010</h2>
<p>That was the year 2009, now we are moving into 2010. What will happen to gridshore in 2010? Who knows? In will write more about grails, Allard more about DDD and CQRS. I will also look into CMS. There are grails options for CMS and there is a new spring project that has to do with alfresco. I also want to write more about Spring integration, flex, caching.</p>
<p>Maybe some other interesting things will come up as well. Hope 2010 will be as interesting as 2009. Hope to see you all back.</p>
<div class='dd_post_share'><div class='dd_buttons'><div class='dd_button'><iframe src='http://widgets.dzone.com/links/widgets/zoneit.html?url=http%3A%2F%2Fwww.gridshore.nl%2F2009%2F12%2F27%2Fthe-year-2009%2F&amp;title=The%20year%202009&amp;t=2' height='25' width='155' frameborder='0' scrolling='no'></iframe></div></div><div style='clear:both'></div></div><!-- Social Buttons Generated by Digg Digg plugin v4.5.3.4, 
    Author : Yong Mook Kim
    Website : http://www.diggdigg2u.com -->]]></content:encoded>
			<wfw:commentRss>http://www.gridshore.nl/2009/12/27/the-year-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Long and Winding Road: a tale of grouping my mails using a user-defined field in Outlook</title>
		<link>http://www.gridshore.nl/2009/10/10/the-long-and-winding-road-a-tale-of-grouping-my-mails-using-a-user-defined-field-in-outlook/</link>
		<comments>http://www.gridshore.nl/2009/10/10/the-long-and-winding-road-a-tale-of-grouping-my-mails-using-a-user-defined-field-in-outlook/#comments</comments>
		<pubDate>Sat, 10 Oct 2009 01:33:38 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Microsoft Outlook 2007]]></category>
		<category><![CDATA[Outlook]]></category>
		<category><![CDATA[User-Defined Fields]]></category>

		<guid isPermaLink="false">http://www.gridshore.nl/2009/10/10/the-long-and-winding-road-a-tale-of-grouping-my-mails-using-a-user-defined-field-in-outlook/</guid>
		<description><![CDATA[<p>First and foremost an apology to all regular readers: I fully realize GridShore is not intended to deal with Microsoft technology (or whatever detritus is collected under that name). However, this one is such a beauty of having to go the long way to get things done that I don&#8217;t want to hold back.</p> [...]]]></description>
			<content:encoded><![CDATA[<p>First and foremost an apology to all regular readers: I fully realize GridShore is not intended to deal with Microsoft technology (or whatever detritus is collected under that name). However, this one is such a beauty of having to go the long way to get things done that I don&#8217;t want to hold back.</p>
<p>As with many a long and winding trail, this one started this morning with what seemed like a short hike across a small and uncomplicated footpath. You see, of late I have found myself making more and more use of the different features of Outlook (something to do with becoming more senior in my company&#8230;). Among others, I&#8217;ve found that I&#8217;ve started using the little flags to mark mails that I have to get back to. But I receive so many mails nowadays that even in a single day the flags get snowed under and pushed off the list. Of course I could just sort by flag status, but I prefer to have today&#8217;s mails at the top (rather than the flags and ticks from two weeks ago). So I had myself a bright idea this morning: I&#8217;ll just change the grouping of my mails to group by received date and then flag status within the date groups. Walk in the park, right?</p>
<p>Oh mother&#8230;.</p>
<p><span id="more-912"></span>
<p>&nbsp;</p>
<h3>First strike: the very simple idea</h3>
<p>Okay, to recap, I wanted to end up with the mails in my inbox grouped first by date of receipt, then by flag status. Now, as it happens, if you do nothing to your Inbox (or any mail folder), Outlook 2007 sorts mails by date by default. You can even see this: just right-click the column headers in Outlook and select Group Box. You&#8217;ll see a tree display of grouping fields.</p>
<p>So, simple idea: just drag the Flag Status column into this Group Box to add it as a grouping to the Date. Unfortunately though, Date is an implicit rather than real property that Outlook groups by if there is nothing else and you cannot add any sub grouping to it. You can <strong>replace</strong> Date with anything, but you cannot add to it. Scratch that idea.</p>
<h3>Second strike: a slightly less simple idea</h3>
<p>So, the implicit Date as main grouping is out. No biggie, because the Receipt time is included in each mail as a property by Outlook. You even see it as a column in the default layout of every mailbox. Quick job to select that instead of the Date, then subgroup by Flag Status.</p>
<p>The result is, unfortunately, unusable. You see, the Receipt column includes the <strong>time</strong> as well as the date, even if you format the column to include only the date (the column format is really just for display). Almost no two mails arrive within the same minute. Group on Receipt time and you&#8217;ll end up with a million groups consisting of just one mail (maybe two every now and then). So that was that idea up the spout as well.</p>
<h3>Third strike: some formula magic</h3>
<p>Okay, so we cannot sort on Receipt time because it is too detailed. And there is no date-only column. But Outlook has a neat little party trick: user-defined fields (UDFs). You can define mail items to have custom properties <em>and you can even associate a VB formula with those properties</em>. So here&#8217;s our solution: create a custom property which will contain the Receipt time with the time part stripped off. Then use that as the main group selector.</p>
<p>Creating a UDF in Outlook 2007 is easy: right-click the column headers and select Field Chooser. From the drop-down, select &#8220;User-defined fields in Inbox&#8221;. Then hit the New button and select Formula as type. Fill in a name for the field and in the Formula box fill in</p>
<p>
<pre class="brush: vb; title: ; notranslate">DateValue( [Received] )</pre>
</p>
<p>Now right-click the column headers again and select &#8220;Customize current view&#8221;. Hit the &#8220;Group by&#8221; button. Uncheck the checkbox and select &#8220;User-defined fields in Inbox&#8221; from the drop-down at the bottom. Now, in the first drop-down for grouping field, select your new field and&#8230;. snag. You cannot select the field.</p>
<p>You see, you cannot group by formula UDFs in Outlook. Probably because VB is typeless in principle, so Outlook cannot predict the type of your field and so cannot compare the values reliably. So that idea is out as well.</p>
<h3>The long way around</h3>
<p>So that means there&#8217;s only one way to do this: add a custom property to each mail in the Inbox with the date part of the receipt time. And since it has to be <em>typed</em> field, it has to be added <strong>programmatically</strong>. So the long road means delving into the guts of VBA for Outlook 2007.</p>
<p>Since we&#8217;re going into programming mode here, it is necessary to think a little about what must be done. We want to add a custom date property to each mail in the inbox. But there are two kinds of mails in the inbox:</p>
<ol start="0">
<li>Mails that are already there, which require a one-time loop to add the property.</li>
<li>Mails which will come in later and must have the property added as they arrive; this will require event handling.</li>
</ol>
<p>In both cases we will have to perform the following, general steps:</p>
<ol start="0">
<li>Get hold of the mail M to be augmented.</li>
<li>Get M&#8217;s receipt time R.</li>
<li>Figure out the date part D<sub>R</sub> of R.</li>
<li>Create a custom property EmailDate for M, with value D<sub>R</sub>.</li>
<li>Save M with its new property EmailDate.</li>
</ol>
<h4>Visual Basic for Applications in Outlook</h4>
<p>Let&#8217;s start with some basics about Outlook Basic (ha, ha, I make a funny). Outlook VBA all lives in one large VBA project file called <strong>VBAProject.OTM</strong>, which contains one project called Project1. Everything has to be added there. Project1 itself consists of a sort of main module called ThisOutlookSession. This is the place to put simple macro&#8217;s and the entry points to larger programs.</p>
<p>VBA for Outlook is essentially the same VBA you find in any Microsoft application: a VBA editor (hit Alt+F11 in Outlook) which supports a subset of Visual Basic with some built-in functions and an application-specific object model. In the case of VBA for Outlook this model models things like Folders, MailItems, CalendarItems and so on.</p>
<p>Like all VBA languages, VBA for Outlook allows you to create special variables which can hold object instances that are aware of application events. For example, if you declare a variable like so:</p>
<p>
<pre class="brush: vb; title: ; notranslate">Dim WithEvents inboxItems As Outlook.Items</pre>
</p>
<p>and then instantiate inboxItems to be the list of items in the inbox, then inboxItems will be aware of any events that occur in the inbox. You can declare event handlers for any interesting events you want to respond to.</p>
<h4>Dealing with existing messages</h4>
<p>Let&#8217;s start simply with the existing messages in the Inbox. To deal with those we need a run-once loop and no event handling. In order to carry out the process outlined above, we will have to get hold of the folder object that represents the inbox in Outlook. We can then loop over the contents of this folder.</p>
<p>While setting the process for existing messages, we will be dealing with mail messages, which are Outlook.MailItem objects. We will be adding a custom property, which is an Outlook.UserProperty object. And we have to deal with the inbox, which is a mail folder &#8212; an Outlook.MAPIFolder object.</p>
<p>Getting hold of the Inbox folder is done by getting the default inbox folder from Outlook&#8217;s MAPI namespace &#8212; this is an object that we can get from the Application object. The Application object is present in every VBA language and represents the application (in this case, Outlook). The MAPI namespace has a getDefaultFolder method which takes a convenient constant to indicate we want the Inbox. After that we can loop over the objects in the Inboxes Items list to set the properties. The result looks like this:</p>
<pre class="brush: vb; title: ; notranslate">Private Sub SetInitialProperties()
  Dim ns As Outlook.NameSpace
  Dim fld As Outlook.MAPIFolder
  Dim objUnknown As Object
  Dim mail As Outlook.MailItem
  Dim prop As Outlook.UserProperty

  Set ns = Application.GetNamespace(&quot;MAPI&quot;)
  Set fld = ns.GetDefaultFolder(olFolderInbox)

  For Each objUnknown In fld.Items
    If TypeOf objUnknown Is MailItem Then
      Set mail = objUnknown
      Set prop = mail.UserProperties.Add(&quot;EmailDate&quot;, olDateTime, True)
      prop.Value = DateValue(mail.ReceivedTime)
      mail.Save
      Set prop = Nothing
      Set mail = Nothing
    End If
  Next

  Set objUnknown = Nothing
  Set fld = Nothing
  Set ns = Nothing
End Sub</pre>
<p>As you can see, adding a custom property is pretty straightforward; there are constants to indicate the type (which is why we are using VBA, of course). Getting the date is a matter of manipulating the existing ReceivedTime property of each mail a little. It is worth noting in the loop that there is a check to see if each item is really a MailItem &#8212; the Inbox may also contain sub folders, you see.</p>
<p>Next, hit the Run button to run the routine. Then check in Outlook (right-click the column headers, select the Field Chooser and select the UDF&#8217;s from the drop-down; drag the new field onto the Inbox columns). The new field contains the date of the mails, but the time midnight (so no more minutes to screw up the grouping). Try grouping by the new column &#8212; this time it works, since the new column has a type.</p>
<h4>Dealing with incoming mail</h4>
<p>In order to set the same property on incoming mail, we need an event handler. As explained above, we can create a special variable that will be made aware of events on any specific object (like the list of items in the Inbox). In fact, that list is particularly useful to monitor since it broadcasts an event every time an item is added. With that information, the actual event handler is pretty straightforward:</p>
<pre class="brush: vb; title: ; notranslate">Private Sub inboxItems_ItemAdd(ByVal Item As Object)
  Dim prop As Outlook.UserProperty
  Dim mail As Outlook.MailItem

  If TypeOf Item Is MailItem Then
    Set mail = Item
    Set prop = mail.UserProperties.Add(&quot;EmailDate&quot;, olDateTime, True)
    prop.Value = DateValue(mail.ReceivedTime)
    mail.Save
    Set prop = Nothing
    Set mail = Nothing
  End If
End Sub</pre>
<p>Again, note the check for whether an item is a MailItem and not a new sub folder.</p>
<p>As you can see, the VBA convention is to have the name of the event handler be &lt;variable&gt;_&lt;event&gt;(&lt;parameters&gt;). This is also how the VBA interpreter links events to methods (or subroutines in this case).</p>
<p>Now, the event handler is pretty simple. But it does depend on the variable inboxItems being initialized to refer to the list of items in the inbox. So how is this accomplished?</p>
<h4>Initializing the inbox variable</h4>
<p>Obviously, since Outlook does not provide a database for its VBA macros, there is no such thing as a persistent variable. We will have to redefine the inboxItems variable each time Outlook starts. You guessed it: we need another event handler, written the same way as the earlier one (a subroutine referring to a variable). But isn&#8217;t that a chicken-and-the-egg problem? How do we initialize <strong>that</strong> variable? Luckily, as remarked before, there is one variable which is always implicitly available: the Application variable. And that represents Outlook which, lucky for us, is exactly what we need (we want to listen for application starts of Outlook). So our primal event handler will look like this:</p>
<pre class="brush: vb; title: ; notranslate">Private Sub Application_Startup()
  Dim ns As Outlook.NameSpace
  Dim fld As Outlook.MAPIFolder

  Set ns = Application.GetNamespace(&quot;MAPI&quot;)
  Set fld = ns.GetDefaultFolder(olFolderInbox)
  Set inboxItems = fld.Items

  Set ns = Nothing
  Set fld = Nothing
End Sub</pre>
<p>Startup is, of course, the event fired when Outlook starts.</p>
<p>&nbsp;</p>
<h4>Testing the event handler</h4>
<p>The simple way to test the event is to run the Application_Startup() subroutine using the Outlook VBA tool to set the system up. Hit Alt-F11, open the ThisOutlookSession module (which contains the code described above), put the cursor in the Application_Startup() routine and hit the Run button. Then go back to Outlook and send yourself a mail. Once it arrives, it will have the new property automatically set.</p>
<p>&nbsp;</p>
<h3>Just when you think you&#8217;re there&#8230;</h3>
<p>If you&#8217;ve been following along, there&#8217;s another test you can do (and which I did): close Outlook and start it up again. Then send yourself another mail. If you&#8217;re running Outlook 2003 or 2007, the new mail probably will <strong>not</strong> have the new UDF set.</p>
<p>So what went wrong? We created the event handler, the Outlook startup event handler to set everything up and tested it to see it working? Well, some debugging will tell you almost immediately that the Outlook startup event handler is not called. And the reason, it eventually occurred to me, is macro security. You see, by default Outlook will not run unsigned macros. Even macros defined in its own macro module.</p>
<p>You can get around this easily by going to the security settings for macros (in Outlook 2007 it&#8217;s called the TrustCenter) and selecting to run unsigned macros with a warning. But a better idea is to create a self-signed certificate and use that to sign your macro module.</p>
<p>To create the certificate, you need a tool called SelfCert.exe, which is installed with Office in the Office install directory (try c:\program files\Microsoft office\office <strong>or</strong> c:\program files\Microsoft office\office12). Run the program, fill in a name for your certificate and click OK. Then go to the Outlook VBA editor and select Digital Signature from the Tools menu. Click Choose and select your certificate. Click Ok and then save the module.</p>
<p>Now restart Outlook. It will give you a warning about macros, but if you select &#8220;Enable macros&#8221; everything will work. You can elect to trust your own certificate in the same dialog, which will eliminate the warning.</p>
<h3>Finally&#8230;</h3>
<p>So, finally, after all that, my Inbox is now grouped by date and then flag status. That took some doing&#8230;..</p>
<p>But perhaps someone else will find the experience useful.</p>
<p>&nbsp;</p>
<h5>Sources</h5>
<p>The following forum archive provided me some valuable insights into how to get all of this working: <a title="http://www.eggheadcafe.com/forumarchives/outlook/Oct2005/post24967825.asp" href="http://www.eggheadcafe.com/forumarchives/outlook/Oct2005/post24967825.asp">www.eggheadcafe.com/forumarchives/outlook/Oct2005/post24967825.asp</a></p>
<div class='dd_post_share'><div class='dd_buttons'><div class='dd_button'><iframe src='http://widgets.dzone.com/links/widgets/zoneit.html?url=http%3A%2F%2Fwww.gridshore.nl%2F2009%2F10%2F10%2Fthe-long-and-winding-road-a-tale-of-grouping-my-mails-using-a-user-defined-field-in-outlook%2F&amp;title=The%20Long%20and%20Winding%20Road%3A%20a%20tale%20of%20grouping%20my%20mails%20using%20a%20user-defined%20field%20in%20Outlook&amp;t=2' height='25' width='155' frameborder='0' scrolling='no'></iframe></div></div><div style='clear:both'></div></div><!-- Social Buttons Generated by Digg Digg plugin v4.5.3.4, 
    Author : Yong Mook Kim
    Website : http://www.diggdigg2u.com -->]]></content:encoded>
			<wfw:commentRss>http://www.gridshore.nl/2009/10/10/the-long-and-winding-road-a-tale-of-grouping-my-mails-using-a-user-defined-field-in-outlook/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Bad science&#8230;</title>
		<link>http://www.gridshore.nl/2009/09/13/bad-science/</link>
		<comments>http://www.gridshore.nl/2009/09/13/bad-science/#comments</comments>
		<pubDate>Sun, 13 Sep 2009 17:58:13 +0000</pubDate>
		<dc:creator>Ben</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.gridshore.nl/2009/09/13/bad-science/</guid>
		<description><![CDATA[<p>The last few days I&#8217;ve been reading BAD Astronomy, a book by astronomer Philip Plait that describes common misconceptions, misuses and scientific abuses of astronomy. Partly written to be funny and partly to debunk the nonsense that arises from people misusing and abusing science, it&#8217;s a good and worthwhile read for anybody (especially if [...]]]></description>
			<content:encoded><![CDATA[<p>The last few days I&#8217;ve been reading <strong><em>BAD Astronomy</em></strong>, a book by <a href="http://en.wikipedia.org/wiki/Astronomy">astronomer</a> <a title="Philip Plait" href="http://en.wikipedia.org/wiki/Phil_Plait">Philip Plait</a> that describes common misconceptions, misuses and scientific abuses of <a href="http://en.wikipedia.org/wiki/Astronomy">astronomy</a>. Partly written to be funny and partly to debunk the nonsense that arises from people misusing and abusing science, it&#8217;s a good and worthwhile read for anybody (especially if you have some spare time on your hands).
<div class="amtap-item" lang="en" xml:lang="en"><a href="http://www.amazon.com/Bad-Astronomy-Misconceptions-Revealed-Astrology/dp/0471409766%3FSubscriptionId%3D1K0D2VE3R9MFT576B1G2%26tag%3Dgridshore-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D0471409766"><img src="http://ecx.images-amazon.com/images/I/513CRq2HkML._SL110_.jpg" width="73" height="110" alt=""/></a><br />
<h3><a href="http://www.amazon.com/Bad-Astronomy-Misconceptions-Revealed-Astrology/dp/0471409766%3FSubscriptionId%3D1K0D2VE3R9MFT576B1G2%26tag%3Dgridshore-20%26linkCode%3Dxm2%26camp%3D2025%26creative%3D165953%26creativeASIN%3D0471409766">Bad Astronomy</a></h3>
<p class="author">Philip C. Plait.					Wiley 2002, 					Paperback,				288 pages,				&#36;8.38</p>
</div>
<p>Reading through the book I came to chapter 14, which deals with the doomsday advocates who swore up and down that the world was going to come to an end on May 5, 2000 due to a planetary alignment (more or less) of <a href="http://en.wikipedia.org/wiki/Mercury_(planet)">Mercury</a>, <a href="http://en.wikipedia.org/wiki/Venus">Venus</a>, <a href="http://en.wikipedia.org/wiki/Mars">Mars</a>, <a href="http://en.wikipedia.org/wiki/Jupiter">Jupiter</a> and <a href="http://en.wikipedia.org/wiki/Saturn">Saturn</a>. It was quite funny to read Plait&#8217;s description of why this neither would nor <strong>did</strong> cause catastrophe for our planet. But more than that, the chapter got me thinking about how bad science is all around us and affects us in sometimes rather drastic ways.</p>
<p><span id="more-905"></span></p>
<p>In the case of Plait&#8217;s example nothing really very drastic happened to anybody (except a few people who were duped into buying bogus survival gear to help them survive the new <a href="http://en.wikipedia.org/wiki/Ice_age">ice age</a> that the <a href="http://en.wikipedia.org/wiki/Planetary_alignment">planetary alignment</a> was supposed to <a href="http://en.wikipedia.org/wiki/Precession_(astronomy)#Astronomy">drop the planet into</a>). However, not everything that is misunderstood is so innocent. Take for example a court case in the Netherlands (this was quite a long time ago, to be honest):</p>
<p>In this particular case a bridge guard was being sued by a <a href="http://en.wikipedia.org/wiki/Barge">barge</a> captain because the captain felt the bridge guard didn&#8217;t <a href="http://en.wikipedia.org/wiki/Cantilever_bridges">open the bridge</a> often enough daily. The bridge was too low for the barge to pass under (by a meter) and the frequent delays cost the captain money. So he sued to get the bridge opened more often. The judge in this case was a long-standing lord of the bench, properly educated in languages and law (as most judges), but not so much in the sciences. His ruling was that the bridge guard could not be forced to alter his ways and that instead, the captain should pay (out of his own pocket) to have the river bed under the bridge dug out an extra meter. It took testimony from a professor of physics of the <a href="http://www.tudelft.nl/">University of Delft</a> to explain to the judge that <a href="http://en.wikipedia.org/wiki/Buoyancy">that is not how it works</a>.</p>
<p><a href="http://en.wikipedia.org/wiki/Lawyer">Lawyers</a> (and related persons) are particularly good at bad science, it seems. And not just <a href="http://en.wikipedia.org/wiki/Physics">physics</a>, but also <a href="http://en.wikipedia.org/wiki/Mathematics">mathematics</a> and <a href="http://en.wikipedia.org/wiki/Logic">logic</a>. A former professor of mine (a computer scientist, philosopher and master of law) told us some particularly nice anecdotes about the brilliance of Dutch traffic law, for instance. Dutch traffic law specifies that there are priority vehicles (ambulances, police cars, etc.) which have priority in all traffic situations. Dutch traffic law also specifies that traffic signs (signs, lights, arrows painted on the road, etc.) have priority over traffic rules. Makes sense so far, right? Except, my professor pointed out, the law was written by lawyers. Who encoded the two rules mentioned into two separate and completely unrelated articles like so:</p>
<blockquote><p><em>A. One must always give precedence to priority vehicles.</em></p>
<p><em>B. Traffic signs have priority over traffic rules.</em></p></blockquote>
<p>Taken like that, the law says that priority vehicles must stop for red lights. We are all grateful that they disobey the law constantly.</p>
<p>Recently, I got embroiled in an even more far reaching example of bad logic and the law. On some forum somewhere I got into an argument with someone (whom I suspect is a first-year law student) about the <a href="http://en.wikipedia.org/wiki/Dutch_constitution">Dutch constitution</a>. Our constitution is a pretty typical constitutional document which describes the basic organization of country and government, as well as the civil rights of the citizens and other inhabitants. Perhaps a little unusual (but quite well thought-out, I feel), our constitution recognizes that not every right can or should be absolute. Several of our civil rights are therefore worded in the following structure:</p>
<div style="margin-left: 2em" dir="ltr">
<ol>
<li>
<div>Some general rule which applies if no exception is made;</div>
</li>
<li>
<div>The Law determines which exceptions exist to the aforementioned rule.</div>
</li>
</ol>
</div>
<p>For example, our constitution guarantees the right to free speech; but the constitution also leaves room for the law to set limits (such as forbidding insults to whole groups within society).</p>
<p>The suspected law student, <a href="http://hawaii.hawaii.edu/wwwreading/Fallacies/fallacydefinitions.htm">in a bit of brilliant logical derivation</a>, arrived at the conclusion that it is possible for the law in our country to contradict the constitution and therefore that our constitution as a whole is meaningless. That is (to stick with the example above), if it is forbidden to insult all Jews/Christians/Muslims in the country, then the law violates the free speech article and since the constitution is not enforced over the law it means nothing. I&#8217;ll admit that the truth is a little subtle: the constitution sets a <em>general rule</em> and allows the law to create exceptions. So the law creates an exception (or violation) of the general rule, but not of the constitution. But still, you&#8217;d think that even a law student (a lawyer to be) should be able to spot that he&#8217;s claiming that a law whose existence is <strong>explicitly allowed</strong> by the constitution is a violation of that constitution&#8230;</p>
<p>Bad science, I fear, is all around us all the time. Especially since the environment has started playing a major role in decision making. From the greenhouse effect down to whether or not you are poisoning the environment by dumping non-biodegradable plastic in it (you&#8217;re not, by the way &#8212; non-biodegradable plastic isn&#8217;t biodegradable, so it doesn&#8217;t interact with the environment if dumped in nature somewhere), bad science pervades life. Two months ago, in The Netherlands, there was a great commotion is some village about plans to store carbon dioxide gas in an old natural gas pit which has been depleted by the national gas seller. Now, this was a porous rock stratum at over a kilometer depth in which nature has stored flammable gas for millions of years, under pressure, without a single leak or explosion. But for some reason the inhabitants (who had been living, technically, on a bomb for centuries before the gas was pumped out) are now scared of living on top of inert, non-flammable gas that is to be stored in the same stratum under less pressure than the gas was under.</p>
<p>Bad science is often funny to read about. But equally as often it is no joke at all, as it leads to bad decisions. When people misunderstand science and especially when bad people are creating bad science in order to make people make bad decisions. So a valid question arises: where are the scientific and engineering communities amidst this storm of bad science? Why don&#8217;t they have a more active role in society and why doesn&#8217;t society ask them to have a more active part?</p>
<p>In this country, we have several professional societies for scientists and engineers. I&#8217;m even a member of one of them (KIvI/NIRIA). Now, it&#8217;s not that they don&#8217;t try. Really, they do. <a href="http://www.kiviniria.net/">KIvI/NIRIA</a>, the <a href="http://www.onri.nl/cms/publish/content/showpage.asp?themeid=2">ONRI</a>, the VSNU, all sorts of others, they all feel the need to play a more active role in society, to influence decision making and to try and be voices of reason amidst the insanity. But they do it in the way engineers have become accustomed to over the past forty years; silently, in the background, trying to be the quiet advisor in the ear of the board. And so they often miss; they get drowned out in the melee, overruled by the opinions of the crowd that are based on nothing that makes any sense. And then, instead of trying to push bask, they submit to the nonsense because the decision has been made and once the decision has been made you no longer disagree. And that may be the worst science of all&#8230;.</p>
<div class='dd_post_share'><div class='dd_buttons'><div class='dd_button'><iframe src='http://widgets.dzone.com/links/widgets/zoneit.html?url=http%3A%2F%2Fwww.gridshore.nl%2F2009%2F09%2F13%2Fbad-science%2F&amp;title=Bad%20science...&amp;t=2' height='25' width='155' frameborder='0' scrolling='no'></iframe></div></div><div style='clear:both'></div></div><!-- Social Buttons Generated by Digg Digg plugin v4.5.3.4, 
    Author : Yong Mook Kim
    Website : http://www.diggdigg2u.com -->]]></content:encoded>
			<wfw:commentRss>http://www.gridshore.nl/2009/09/13/bad-science/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

