<?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>Developers blog &#187; Development</title>
	<atom:link href="http://www.realdevelopers.com/blog/category/development/feed" rel="self" type="application/rss+xml" />
	<link>http://www.realdevelopers.com/blog</link>
	<description>realdevelopers.com</description>
	<lastBuildDate>Wed, 14 Sep 2011 21:38:34 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Pair Teaching: How to build a Web Application on the Couch</title>
		<link>http://www.realdevelopers.com/blog/development/pair-teaching-how-to-build-a-web-application-on-the-couch</link>
		<comments>http://www.realdevelopers.com/blog/development/pair-teaching-how-to-build-a-web-application-on-the-couch#comments</comments>
		<pubDate>Wed, 14 Sep 2011 10:23:33 +0000</pubDate>
		<dc:creator>Helga</dc:creator>
				<category><![CDATA[Culture]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[CouchDB]]></category>
		<category><![CDATA[NoSQL]]></category>
		<category><![CDATA[pairing]]></category>
		<category><![CDATA[teaching]]></category>

		<guid isPermaLink="false">http://www.realdevelopers.com/blog/?p=1494</guid>
		<description><![CDATA[Recently I was co-lecturing a workshop about web application developement with CouchDB. The event took place in the scope of a Summer University, which explicitly claims to provide a setting for lecturers to improve and to try out experimental teaching concepts.
Apart from simply distributing the share of work and apart from parallelizing preparation as well [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I was co-lecturing a workshop about web application developement with <a href="http://couchdb.apache.org/">CouchDB</a>. The event took place in the scope of a <a href="http://www.informatica-feminale.de/en/index.html">Summer University</a>, which explicitly claims to provide a setting for lecturers to improve and to try out experimental teaching concepts.</p>
<p>Apart from simply distributing the share of work and apart from parallelizing preparation as well as oral presentation, my impression is that lecturing in pairs has positive side effects similiar to pair programming: <span id="more-1494"></span></p>
<ul>
<li><strong>better discipline, better flow:</strong> It is easier to fight off disruptions or to get back to the topic after disruptions (e.g. students questions, unforeseen complications with the students OSs etc.)</li>
<li><strong>mentoring, sharing knowledge:</strong> The knowlege you share is not only more details on the topic you are teaching, but also knowledge about the teaching process itself &#8211; as you watch how your pair talks to the students, how she partitions the topics, how she words the tasks and how the students react, you can adjust your own teaching style. This is learning by doing at its best.</li>
<li><strong>better quality, less errors:</strong> As the passive pair lecturer has a distant view on what is being said, she is better able to add details and corrections &#8211; thus improving the lecture quality. And of course the different focus of expertise allows for a more comprehensive presentation. Complex topics can even be presented in a dialog style.</li>
<li><strong>fun:</strong> No matter how bright you are, it is always fun to work together with like-minded people. If you have fun, you will convey the enthusiasm for your topic. Students will be better motivated, hence teaching will be improved.</li>
<li><strong>confidence:</strong> Shy people need extra backup to talk in front of a crowd. Having a fallback helps.</li>
</ul>
<p>As for CouchDB itself: The workshop preparation was an excellent opportunity to dive into the principles of <a href="http://en.wikipedia.org/wiki/NoSQL">non-relational databases</a>, especially schemaless key-value-stores. Apart from the <a href="http://en.wikipedia.org/wiki/CAP_theorem">CAP-theorem</a> and the idea of resigning consistency in favour of availibility and partition tolerance, I am also excited about the option of having data and application together &#8211; thus disposing the need of manually keeping application versions and data migrations in sync. Can&#8217;t wait for a real world project to try CouchDB!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.realdevelopers.com/blog/development/pair-teaching-how-to-build-a-web-application-on-the-couch/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Programming Shirts</title>
		<link>http://www.realdevelopers.com/blog/fun/programming-shirts</link>
		<comments>http://www.realdevelopers.com/blog/fun/programming-shirts#comments</comments>
		<pubDate>Sun, 11 Sep 2011 16:06:53 +0000</pubDate>
		<dc:creator>astro</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[Arduino]]></category>
		<category><![CDATA[DIY]]></category>
		<category><![CDATA[Lilypad]]></category>

		<guid isPermaLink="false">http://www.realdevelopers.com/blog/?p=1462</guid>
		<description><![CDATA[After seeing it at last year&#8217;s decoded conference I wanted to have an arduino and finally got me a Lilypad &#8211; its purple, sewable, cute little sister designed to build interactive clothing. It was even more fun than I thought and I spent a whole weekend and several evenings designing, programming, debugging and sewing my [...]]]></description>
			<content:encoded><![CDATA[<p>After seeing it at last year&#8217;s <a href="http://www.realdevelopers.com/blog/code/decoded-conference">decoded conference</a> I wanted to have an arduino and finally <a href="http://www.tinkersoup.de/">got me</a> a <a href="http://web.media.mit.edu/~leah/LilyPad/">Lilypad</a> &#8211; its purple, sewable, cute little sister designed to build interactive clothing. It was even more fun than I thought and I spent a whole weekend and several evenings designing, programming, debugging and sewing my first interactive shirt.</p>
<p><img class="alignnone size-full wp-image-1472" title="The finished shirt" src="http://www.realdevelopers.com/blog/wp-content/uploads/2011/09/RIMG1899.jpg" alt="" width="291" height="319" /></p>
<p><strong>That&#8217;s how I made it&#8230; </strong><br />
<span id="more-1462"></span></p>
<p><img class="size-full wp-image-1464 alignnone" title="Lilypad board" src="http://www.realdevelopers.com/blog/wp-content/uploads/2011/09/RIMG1880.jpg" alt="" width="320" height="240" /><br />
This is the Lilypad board. The alligator clips are connected to a temperature sensor and a three color LED, the red adaptor links the board via USB to the computer to upload the code [<a href="http://www.realdevelopers.com/blog/wp-content/uploads/2011/09/tempTriColorFinal.pde_.zip">Get it here</a>]. Coding is done in C++ in a processing-like environment.<br />
You only need to specify what should happen in the setup and in the loop phase, the arduino magic takes care of the rest. This let&#8217;s you start really fast without knowing anything about hardware programming!</p>
<p><img class="alignnone size-full wp-image-1465" title="Testing the code - cold" src="http://www.realdevelopers.com/blog/wp-content/uploads/2011/09/RIMG1885.jpg" alt="" width="320" height="240" /><br />
The LED (having three inputs for red, blue and green) glows blue if it&#8217;s cold&#8230;</p>
<p><img class="alignnone size-full wp-image-1466" title="Testing the code - cold [detail]" src="http://www.realdevelopers.com/blog/wp-content/uploads/2011/09/RIMG1886.jpg" alt="" width="320" height="240" /><br />
&#8230; like in this box of frozen peas. Testing hardware is much more fun than testing software!</p>
<p><img class="alignnone size-full wp-image-1467" title="Testing the code - hot" src="http://www.realdevelopers.com/blog/wp-content/uploads/2011/09/RIMG1887.jpg" alt="" width="320" height="240" /><br />
When it&#8217;s hot, the LED turns red. In between there&#8217;s a gradient from blue to cyan and from yellow to deep red.</p>
<p><img class="alignnone size-full wp-image-1468" title="Sewn on components" src="http://www.realdevelopers.com/blog/wp-content/uploads/2011/09/RIMG1891.jpg" alt="" width="320" height="240" /><br />
The sewn on board (middle), sensor (left) and LED (right). At the bottom of the board there&#8217;s a hole to hide the ugly battery on the back of the shirt. On the top of the picture you can see the layout of the circuit. It&#8217;s important to have a design where the cables (or, for Lilypad, the silver threads) don&#8217;t cross too often, because it makes sewing easier &#8211; you have to isolate each crossing.</p>
<p><img class="alignnone size-full wp-image-1469" title="Connecting the positive pole" src="http://www.realdevelopers.com/blog/wp-content/uploads/2011/09/RIMG1893.jpg" alt="" width="320" height="240" /><br />
The first few stitches with the silver thread, leading away from the positive pole. This was surprisingly easy, because the thread is really soft and not at all like wire.</p>
<p><img class="alignnone size-full wp-image-1470" title="Testing the first connection" src="http://www.realdevelopers.com/blog/wp-content/uploads/2011/09/RIMG1894.jpg" alt="" width="320" height="240" /><br />
The first circuit is finished, connecting the board with the sensor. Using alligator clips to check if it&#8217;s still working&#8230; and it is! The LED shines yellow.</p>
<p><img class="alignnone size-full wp-image-1471" title="The back side of my shirt" src="http://www.realdevelopers.com/blog/wp-content/uploads/2011/09/RIMG1895.jpg" alt="" width="320" height="240" /><br />
The reverse side of my shirt after sewing everything together. I used band-aids to isolate the threads. Note the long stitches &#8211; those are connections running mainly on the back side and covered with tiny silver pearls when coming to the front. Having all stitches on the front side would have made it impossible to make the shirt look like three flowers growing next to each other, it would have just looked like a circuit. I also added some petals (using normal thread in purple and turquoise) to make it look prettier.</p>
<p>And yes, I really do wear it! Only feels a little bit nerdy&#8230; and there&#8217;s a switch on the board to turn it off.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.realdevelopers.com/blog/fun/programming-shirts/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hello, Visual Studio</title>
		<link>http://www.realdevelopers.com/blog/development/hello-visual-studio</link>
		<comments>http://www.realdevelopers.com/blog/development/hello-visual-studio#comments</comments>
		<pubDate>Tue, 31 May 2011 21:10:41 +0000</pubDate>
		<dc:creator>astro</dc:creator>
				<category><![CDATA[Culture]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[IDEA]]></category>
		<category><![CDATA[ReSharper]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://www.realdevelopers.com/blog/?p=1440</guid>
		<description><![CDATA[On Monday, I started working on a new product (well, the product is not new, I only joined) and it&#8217;s neither Java nor Grails, but .NET. Which means working with a new (also not new, but I haven&#8217;t used in in ten years) OS, a new IDE, new team, new code, &#8230;
Luckily, there&#8217;s ReSharper, a [...]]]></description>
			<content:encoded><![CDATA[<p>On Monday, I started working on a new product (well, the product is not new, I only joined) and it&#8217;s neither Java nor Grails, but .NET. Which means working with a new (also not new, but I haven&#8217;t used in in ten years) OS, a new IDE, new team, new code, &#8230;</p>
<p>Luckily, there&#8217;s <a href="http://www.jetbrains.com/resharper/">ReSharper</a>, a great tool for visual studio, that let&#8217;s me use all the shortcuts I know from IntelliJ IDEA.</p>
<p>But as all the rest is so new and exciting, be prepared for a lot of beginner&#8217;s posts about C#, Team Foundation Server, working off-site and alike.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.realdevelopers.com/blog/development/hello-visual-studio/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Awesome subversion shortcut</title>
		<link>http://www.realdevelopers.com/blog/development/awesome-subversion-shortcut</link>
		<comments>http://www.realdevelopers.com/blog/development/awesome-subversion-shortcut#comments</comments>
		<pubDate>Fri, 11 Feb 2011 13:29:11 +0000</pubDate>
		<dc:creator>astro</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[SVN]]></category>

		<guid isPermaLink="false">http://www.realdevelopers.com/blog/?p=1402</guid>
		<description><![CDATA[Just found this great shortcut in subversion (introduced in 1.6):
Instead of typing the whole path to your repository root, you can simply use a caret (^). This is especially useful when switching to a branch
svn switch ^/branches/new
or merging the trunk
svn merge ^/trunk
Before that I always did svn info, copied the path, etc. etc.
]]></description>
			<content:encoded><![CDATA[<p>Just found this great shortcut in subversion (introduced in 1.6):<br />
Instead of typing the whole path to your repository root, you can simply use a caret (^). This is especially useful when switching to a branch
<pre>svn switch ^/branches/new</pre>
<p>or merging the trunk
<pre>svn merge ^/trunk</pre>
<p>Before that I always did svn info, copied the path, etc. etc.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.realdevelopers.com/blog/development/awesome-subversion-shortcut/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Scared by my IDE</title>
		<link>http://www.realdevelopers.com/blog/development/scared-by-my-ide</link>
		<comments>http://www.realdevelopers.com/blog/development/scared-by-my-ide#comments</comments>
		<pubDate>Mon, 10 Jan 2011 22:43:55 +0000</pubDate>
		<dc:creator>Helga</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[clean code]]></category>
		<category><![CDATA[IDEA]]></category>

		<guid isPermaLink="false">http://www.realdevelopers.com/blog/?p=1381</guid>
		<description><![CDATA[In general it&#8217;s a good thing, when your IDE is able to surprise you from time to time. However I was a little scared, when IntelliJ IDEA informed me that vertex(maxX, maxX, 0); was probably wrong. Of course I knew that I was gonna replace the second maxX with maxY as soon as I would [...]]]></description>
			<content:encoded><![CDATA[<p>In general it&#8217;s a good thing, when your IDE is able to surprise you from time to time. However I was a little scared, when IntelliJ IDEA informed me that <code>vertex(maxX, maxX, 0);</code> was probably wrong. Of course I knew that I was gonna replace the second maxX with maxY as soon as I would give up symmetry and calculate the second dimension, but IDEA &#8211; how could it know? It&#8217;s easy &#8211; the vertex methods parameter names are <code>(x, y, z)</code> &#8211; that&#8217;s why IDEA infered that &#8220;max&#8221; was probably a prefix. Clever. By the way this confirms the need to choose meaningful and consistent names, even though your IDE is the only one who will ever read and comment on your code <img src='http://www.realdevelopers.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.realdevelopers.com/blog/development/scared-by-my-ide/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Undo changes from a deleted branch</title>
		<link>http://www.realdevelopers.com/blog/development/undo-changes-from-a-deleted-branch</link>
		<comments>http://www.realdevelopers.com/blog/development/undo-changes-from-a-deleted-branch#comments</comments>
		<pubDate>Mon, 03 Jan 2011 18:17:11 +0000</pubDate>
		<dc:creator>astro</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[SVN]]></category>

		<guid isPermaLink="false">http://www.realdevelopers.com/blog/?p=1373</guid>
		<description><![CDATA[Once in a while it happens that you have to roll back some changes you made in a branch that was already signed off, reintegrated into the trunk and deleted. This is how it can be achieved:
1. resurrect your branch by copying the revision you want to roll back (here: 28120) to a new branch:
svn [...]]]></description>
			<content:encoded><![CDATA[<p>Once in a while it happens that you have to roll back some changes you made in a branch that was already signed off, reintegrated into the trunk and deleted. This is how it can be achieved:</p>
<p>1. resurrect your branch by copying the revision you want to roll back (here: 28120) to a new branch:<br />
svn copy http://svn.domain.com/branches/new_feature@28120 http://svn.domain.com/branches/new_feature -m &#8220;restore temporarily&#8221;</p>
<p>2. in your local copy, undo the specific change (c -28120 is the same as -r 28120:28119):<br />
svn merge -c -28120 http://svn.domain.com/branches/new_feature</p>
<p>3. the usual: build, test, commit.<span id="more-1373"></span></p>
<p>Unfortunately, you have to do this in two steps and maybe it messes up your merge info a bit, but we didn&#8217;t find a better solution. Simply rolling back from the deleted branch didn&#8217;t work.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.realdevelopers.com/blog/development/undo-changes-from-a-deleted-branch/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Small is beautiful</title>
		<link>http://www.realdevelopers.com/blog/development/small-is-beautiful</link>
		<comments>http://www.realdevelopers.com/blog/development/small-is-beautiful#comments</comments>
		<pubDate>Sun, 12 Sep 2010 11:03:41 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[Culture]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[team]]></category>

		<guid isPermaLink="false">http://www.realdevelopers.com/blog/?p=1328</guid>
		<description><![CDATA[I have always had the feeling that industrial processes are a bad metaphor for software development.
If creating software were like producing cars, then more people would mean more output. Somehow I have never seen that work. Ever since Fred Brooks it&#8217;s been accepted fact that there is a diminishing returns curve we are on in [...]]]></description>
			<content:encoded><![CDATA[<p>I have always had the feeling that industrial processes are a bad metaphor for software development.</p>
<p>If creating software were like producing cars, then more people would mean more output. Somehow I have never seen that work. Ever since Fred Brooks it&#8217;s been accepted fact that there is a diminishing returns curve we are on in adding people to a project. I was surprised when I found this blog post that showed that research indicated that the optimum productivity is actually at very small team sizes (actually 4.6)</p>
<p><a href="http://www.erpwiz.com/teamwork-productivity.html">http://www.erpwiz.com/teamwork-productivity.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.realdevelopers.com/blog/development/small-is-beautiful/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Is Grails (now) worth it?</title>
		<link>http://www.realdevelopers.com/blog/development/is-grails-now-worth-it</link>
		<comments>http://www.realdevelopers.com/blog/development/is-grails-now-worth-it#comments</comments>
		<pubDate>Wed, 21 Jul 2010 08:44:42 +0000</pubDate>
		<dc:creator>Helga</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[grails]]></category>
		<category><![CDATA[rapid development]]></category>

		<guid isPermaLink="false">http://www.realdevelopers.com/blog/?p=1272</guid>
		<description><![CDATA[This question was raised and discussed at stackoverflow recently. Having used Grails for the sixbee project I shared our experiences compared to standard J2EE application development, especially to the subquestion:
Does it really confer rapid development benefits?
Definitely, it does. Even if the scaffolding path is left early and conventions are overriden to the own needs, the [...]]]></description>
			<content:encoded><![CDATA[<p>This question was raised and discussed at <a href="http://stackoverflow.com/questions/2055396/is-grails-now-worth-it/3297486">stackoverflow</a> recently. Having used Grails for the sixbee project I shared our experiences compared to standard J2EE application development, especially to the subquestion:</p>
<p><b>Does it really confer rapid development benefits?</b></p>
<p>Definitely, it does. Even if the scaffolding path is left early and conventions are overriden to the own needs, the start-up period is very short, as we don&#8217;t have to care for many different technologies. That kind of lightweightness makes us work not only faster, but also more precise and clean.<span id="more-1272"></span></p>
<p>Writing tags was never easier &#8211; while with JSF we first deliberate about whether it&#8217;s worth the effort, with Grails we just do it. To work testdriven and to achieve a high coverage rate is also made quite easy, although the different test cases and mocking strategies are sometimes inconsistent and buggy.</p>
<p>Switching from Java to Groovy is a great pleasure, we loved to have list and map literals, closures, builders, to throw away our boiler plate &#8220;map&#8221; implementation in Java and to write compact, meaningful and focused code.</p>
<p>What slows down the development speed is the not so perfect IDE-support, which also holds true for the IntelliJ plugin, that we use. The bad, often old and even wrong documentation scattered over different places (foiling the promise &#8220;the search is over&#8221;) gets also in the way of rapid development. So we often had to fall back to source code reading &#8211; subsequently being scared by the underlying Spring class hierarchies.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.realdevelopers.com/blog/development/is-grails-now-worth-it/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SQL Server/Oracle datetime difference</title>
		<link>http://www.realdevelopers.com/blog/development/sql-serveroracle-datetime-difference</link>
		<comments>http://www.realdevelopers.com/blog/development/sql-serveroracle-datetime-difference#comments</comments>
		<pubDate>Fri, 14 May 2010 13:59:42 +0000</pubDate>
		<dc:creator>christof</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Oracle]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.realdevelopers.com/blog/?p=1151</guid>
		<description><![CDATA[This is a short article I write because it would have saved me some significant time had I been able to google it (no time-travel google (yet) &#8211; find articles you will write in the future). So maybe somebody in the future will find this useful  .
What we were doing is to use a [...]]]></description>
			<content:encoded><![CDATA[<p>This is a short article I write because it would have saved me some significant time had I been able to google it (no time-travel google (yet) &#8211; find articles you will write in the future). So maybe somebody in the future will find this useful <img src='http://www.realdevelopers.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> .</p>
<p>What we were doing is to use a Microsoft Business Intelligence/Reporting Server to report on data in an Oracle production database.</p>
<p>Creating the OLAP cubes in the MS system, everything worked fine until I tried to pull in aggregate data over a date field from the database, giving me the mysterious &#8220;Not a legal OleAut date” error message that can be found in the various forums, but none in the context of OLAP cubes.<span id="more-1151"></span></p>
<p>It&#8217;s not brain surgery to determine that somehow either the Oracle schema did have a weird column type &#8211; that we could rule out because it was a regular timestamp(6) column which worked nicely in other places of the cube &#8211; or the data itself was corrupt.</p>
<p>We started to look at the data in the table with a minimum / maximum query</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1"><span class="kw1">SELECT</span> min<span class="br0">&#40;</span>modificationdate<span class="br0">&#41;</span>, max<span class="br0">&#40;</span>modificationdate<span class="br0">&#41;</span> <span class="kw1">FROM</span> fileversion</div>
</li>
</ol>
</div>
<p>and were surprised to find the minimum date displayed as &#8220;01/24/10&#8243;. With month/day/year display this would have been January 24, 2010, wouldn&#8217;t it? We expected the data to go well back into 2006. A closer look on this anomaly showed the culprit: One single line in our 10 mio row table had a timstamp date of actually 0010-01-24 instead of 2010-01-24. With the date display cut short to 2 digits, that was hardly noticable. I <strong>*am*</strong> a fan of <a href="http://en.wikipedia.org/wiki/ISO_8601">ISO 8601</a>!</p>
<p>What the error message was trying us to tell: The date was stored in Oracle allright, even if it were in ancient times, as Oracles datetime and timestamp can represent all dates from January 1, 4712 BC to December 31, 9999 AD. But the Microsoft SQL Server will do only January 1, 1753 to December 31, 9999 AD.</p>
<p>That&#8217;s what triggered the error message, once this one row was fixed, the error was gone. If I were Roman Emperor, I&#8217;d buy Oracle. Else I&#8217;d think about setting up some date constraints in my schema to prevent bogus data from entering &#8211; we didn&#8217;t find out how this could have happened, so better make sure to have your constraints in place before the bogus data comes along!</p>
<p><em>In case you wondered why <a href="http://en.wikipedia.org/wiki/1753">1753</a> &#8211; I had thought about the Boston Tea Party (wrong, that&#8217;s 1773),  but actually according to Wikipedia this was the first full year after Britain had adopted the Gregorian calendar. Spain did in 1582, protestant Hannover in 1700, Greece in 1923. I sure do hope Microsoft has not localized too much.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.realdevelopers.com/blog/development/sql-serveroracle-datetime-difference/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Those dusty corners &#8211; Visual Basic</title>
		<link>http://www.realdevelopers.com/blog/development/those-dusty-corners-visual-basic</link>
		<comments>http://www.realdevelopers.com/blog/development/those-dusty-corners-visual-basic#comments</comments>
		<pubDate>Fri, 07 May 2010 10:58:08 +0000</pubDate>
		<dc:creator>christof</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[SQL]]></category>
		<category><![CDATA[Visual Basic]]></category>

		<guid isPermaLink="false">http://www.realdevelopers.com/blog/?p=1113</guid>
		<description><![CDATA[It can happen more quickly than you think&#8230; even in environments which seem to follow an architectural role model, some dusty corners remain.
We are running an MS SQL Server Reporting Services server for some internal reports on the Oracle production database. Nice enough report generator. Now, I have done more than just some MS Access [...]]]></description>
			<content:encoded><![CDATA[<p>It can happen more quickly than you think&#8230; even in environments which seem to follow an architectural role model, some dusty corners remain.</p>
<p>We are running an MS SQL Server Reporting Services server for some internal reports on the Oracle production database. Nice enough report generator. Now, I have done more than just some MS Access in prehistoric times, and constantly feel reminded of that &#8220;put these 120 line SQL query into the puny little properties textbox and it will do what you want&#8221; type of development. Things have definitely improved over that with MS Visual Studio 2008 and the report designer, but then, without prior notice, I was struggling with Visual Basic&#8230;<span id="more-1113"></span></p>
<p>I was trying to make a text output for the report header, formatting a string parameter as a date, and the current date in case the input parameter was NULL. Simple enough? Have a look:</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">=<span class="kw7">IIf</span><span class="br0">&#40;</span>isNothing<span class="br0">&#40;</span>Parameters!enddate.<span class="me1">Value</span><span class="br0">&#41;</span>,</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;DateTime.<span class="kw7">Now</span>,</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;DateTime.<span class="me1">ParseExact</span><span class="br0">&#40;</span>Parameters!enddate.<span class="me1">Value</span>, <span class="st0">&quot;yyyyMMdd&quot;</span>, <span class="kw2">Nothing</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="br0">&#41;</span></div>
</li>
</ol>
</div>
<p>Looks good, does it? Should work, shouldn&#8217;t it? Doesn&#8217;t.</p>
<p>DateTime.ParseExact() doesn&#8217;t like to be handed a null (VisualBasic: &#8220;Nothing&#8221;) value, and the IIF() function can&#8217;t prevent it. It actually is just a function as any other function, and before it gets called, all parameters have to be evaluated: Thus the DateTime.ParseExact is executed despite that was what I was trying to prevent. The &#8220;Nothing&#8221; check is futile, DateTime.ParseExact() is evaluated before IIF() is called, and throws the exception anyway. Feels like a &#8220;real&#8221; ternary operator, but is just a function. </p>
<p>The fix needs to introduce a guaranteed non-null date string even if it is never used:</p>
<div class="dean_ch" style="white-space: wrap;">
<ol>
<li class="li1">
<div class="de1">=<span class="kw7">IIf</span><span class="br0">&#40;</span>isNothing<span class="br0">&#40;</span>Parameters!enddate.<span class="me1">Value</span><span class="br0">&#41;</span>, </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;DateTime.<span class="kw7">Now</span>, </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp;DateTime.<span class="me1">ParseExact</span><span class="br0">&#40;</span><span class="kw7">IIf</span><span class="br0">&#40;</span>isNothing<span class="br0">&#40;</span>Parameters!enddate.<span class="me1">Value</span><span class="br0">&#41;</span>,</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="co1">&#8216;19991231&#8242;,</span></div>
</li>
<li class="li2">
<div class="de2">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Parameters!enddate.<span class="me1">Value</span><span class="br0">&#41;</span>, </div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="st0">&quot;yyyyMMdd&quot;</span>, <span class="kw2">Nothing</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="br0">&#41;</span></div>
</li>
</ol>
</div>
<p>Alternatively, you could convert the Now value back into a string, to pass into ParseExact. Ah, the hoops they make us jump through! </p>
<p>There is an equivalent problem in Oracle, if you will: COALESCE() will stop evaluating once it found a non-null value, NVL() will first evaluate the second argument as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.realdevelopers.com/blog/development/those-dusty-corners-visual-basic/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

