<?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>Agile Technology</title>
	<atom:link href="http://www.agilogy.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.agilogy.com</link>
	<description>Ingenieria de Software</description>
	<lastBuildDate>Wed, 14 Jul 2010 11:34:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Agilogy presents a paper at ICSOFT 2010</title>
		<link>http://www.agilogy.com/agilogy-presenta-un-article-al-congres-icsoft-2010/</link>
		<comments>http://www.agilogy.com/agilogy-presenta-un-article-al-congres-icsoft-2010/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 11:34:55 +0000</pubDate>
		<dc:creator>jose.raya</dc:creator>
				<category><![CDATA[news]]></category>

		<guid isPermaLink="false">http://www.agilogy.com/?p=379</guid>
		<description><![CDATA[<p>This Friday (July 23rd) Jordi Pradel will be in Athens presenting, at ICSOFT 2010  (International Conference on Software and Data  Technologies), an article that we wrote in collaboration with UPC about information microsystems.</p>
<p>Told quickly, information microsystems are those information systems that are too big for a spreadsheet and too small for a custom development.</p>
<p>In the article we describe&#8230; <br/><a href="http://www.agilogy.com/agilogy-presenta-un-article-al-congres-icsoft-2010/" class="read_more">Read more</a></p>]]></description>
			<content:encoded><![CDATA[<p>This Friday (July 23rd) Jordi Pradel will be in Athens presenting, at ICSOFT 2010  (International Conference on Software and Data  Technologies), an article that we wrote in collaboration with UPC about information microsystems.</p>
<p>Told quickly, information microsystems are those information systems that are too big for a spreadsheet and too small for a custom development.</p>
<p>In the article we describe a new kind of tool (that sits between the spreadsheet and the database) we have been working on for some years as a part of our commitment to research and innovation.</p>
<p>If you are interested in the concept, you can either go to Athens or <a title="Contact" href="http://www.agilogy.com/contacto/">contact</a> us.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.agilogy.com/agilogy-presenta-un-article-al-congres-icsoft-2010/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UML sequence diagrams: More frequent errors</title>
		<link>http://www.agilogy.com/diagrames-de-sequencies-uml-errades-mes-frequents/</link>
		<comments>http://www.agilogy.com/diagrames-de-sequencies-uml-errades-mes-frequents/#comments</comments>
		<pubDate>Wed, 05 May 2010 14:32:07 +0000</pubDate>
		<dc:creator>Jordi Pradel</dc:creator>
				<category><![CDATA[uncategorized]]></category>

		<guid isPermaLink="false">http://www.agilogy.com/?p=111</guid>
		<description><![CDATA[<p>Sorry, this entry is only available in <a href="http://www.agilogy.cat/feed/">Català</a>.</p>
]]></description>
			<content:encoded><![CDATA[<p>Sorry, this entry is only available in <a href="http://www.agilogy.cat/feed/">Català</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.agilogy.com/diagrames-de-sequencies-uml-errades-mes-frequents/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Code lines as a design quality&#8217;s metric</title>
		<link>http://www.agilogy.com/linies-de-codi-com-a-metrica-de-la-qualitat-dun-disseny/</link>
		<comments>http://www.agilogy.com/linies-de-codi-com-a-metrica-de-la-qualitat-dun-disseny/#comments</comments>
		<pubDate>Wed, 05 May 2010 14:31:51 +0000</pubDate>
		<dc:creator>Jose Raya</dc:creator>
				<category><![CDATA[uncategorized]]></category>

		<guid isPermaLink="false">http://www.agilogy.com/?p=109</guid>
		<description><![CDATA[<p>Sorry, this entry is only available in <a href="http://www.agilogy.es/feed/">Español</a>.</p>
]]></description>
			<content:encoded><![CDATA[<p>Sorry, this entry is only available in <a href="http://www.agilogy.es/feed/">Español</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.agilogy.com/linies-de-codi-com-a-metrica-de-la-qualitat-dun-disseny/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MNAC publishes to Internet a catalog with 1,900 of their works</title>
		<link>http://www.agilogy.com/el-mnac-publica-a-internet-un-cataleg-amb-1900-de-les-seves-obres/</link>
		<comments>http://www.agilogy.com/el-mnac-publica-a-internet-un-cataleg-amb-1900-de-les-seves-obres/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 11:45:28 +0000</pubDate>
		<dc:creator>Jordi Pradel</dc:creator>
				<category><![CDATA[uncategorized]]></category>

		<guid isPermaLink="false">http://www.agilogy.com/?p=259</guid>
		<description><![CDATA[<p>Sorry, this entry is only available in <a href="http://www.agilogy.es/feed/">Español</a> and <a href="http://www.agilogy.cat/feed/">Català</a>.</p>
]]></description>
			<content:encoded><![CDATA[<p>Sorry, this entry is only available in <a href="http://www.agilogy.es/feed/">Español</a> and <a href="http://www.agilogy.cat/feed/">Català</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.agilogy.com/el-mnac-publica-a-internet-un-cataleg-amb-1900-de-les-seves-obres/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exceptions best practices</title>
		<link>http://www.agilogy.com/exceptions-best-practices/</link>
		<comments>http://www.agilogy.com/exceptions-best-practices/#comments</comments>
		<pubDate>Wed, 05 Aug 2009 17:34:38 +0000</pubDate>
		<dc:creator>Jordi Pradel</dc:creator>
				<category><![CDATA[design]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[papers]]></category>

		<guid isPermaLink="false">http://www.agilogy.com/?p=250</guid>
		<description><![CDATA[<p>In this article I discuss some of the exceptions best practices. I&#8217;m focusing on exception handling only, on how to avoid a situation where a system fails without clues of what happened or where the code is tangled with ugly exceptions handling without any reason.</p>
<p>I won&#8217;t talk about the finally clause, which is covered extensively out there.</p>
<h2>Causes of</h2><p>&#8230; <br/><a href="http://www.agilogy.com/exceptions-best-practices/" class="read_more">Read more</a></p>]]></description>
			<content:encoded><![CDATA[<p>In this article I discuss some of the exceptions best practices. I&#8217;m focusing on exception handling only, on how to avoid a situation where a system fails without clues of what happened or where the code is tangled with ugly exceptions handling without any reason.</p>
<p>I won&#8217;t talk about the finally clause, which is covered extensively out there.</p>
<h2>Causes of the exception</h2>
<p>There are different situations that may cause an exception to be thrown:</p>
<dl>
<dt>Client error</dt>
<dd>A method invocation is not valid because there is some kind of error in the client code or in the data provided as parameters.</dd>
<dt>Resource failure</dt>
<dd>The exception was caused due to a resource failure, like a fallen network connection, or a fallen database.</dd>
<dt>Programming error</dt>
<dd>The exception shouldn&#8217;t be never thrown, but is due to a programming error. The most classical example of this is NullPointerException.</dd>
</dl>
<h2>Do not swallow exceptions</h2>
<p>When an exception occurs, you (the programmer) can be in one of two situations: Most of the times, you won&#8217;t know how to solve the problem, but sometimes you may know what to do.</p>
<p>An example of when a programmer knows what to do could be the situation where he tries to update a row in a DB and, if the row does not exist, insert it as a new row:</p>
<p>Example: It is ok the catch an exception when you know what to do to solve it</p>
<pre class="brush: java;"> try {
update(data);
}catch(RowNotFoundException e){
insert(data);
}
</pre>
<p>Whenever you don&#8217;t know what to do with the exception, you shouldn&#8217;t really catch it. If you did so no exception would be thrown by the method, the client code would never know that something went wrong.</p>
<p>Common mistakes regarding this are:</p>
<ul>
<li>Empty catch blocks</li>
<li>Catch blocks with only &#8220;e.printStackTrace()&#8221; or &#8220;logger.warn(e)&#8221;</li>
</ul>
<h3>Examples of bad practices</h3>
<pre class="brush: java;"> try {
...
} catch(WhateverException e) {
e.printStackTrace();
}</pre>
<pre class="brush: java;">
try {
...
} catch(WhateverException e) {}
</pre>
<pre class="brush: java;"> try {
...
return something;
} catch(WhateverException e) {
return null;
}
</pre>
<h2>Use standard exceptions when possible</h2>
<p>Java already defines a bunch of common exceptions that can (and should) be used instead of creating a new exception class every time. Some common examples are:</p>
<dl>
<dt>IllegalStateException</dt>
<dl>The invocation of the operation is not valid because of the current state of the object. </dl>
<dt>IllegalArgumentException</dt>
<dl>One of the arguments of the method call is illegal. Example: An int argument must be &gt;= 0.</dl>
</dl>
<h2>Always use unchecked exceptions</h2>
<p>Java checked exceptions (those that are subclass of Exception) where intended to be used when the client code finding the exception knows how to handle the exception. Checked exceptions  force the client programmer to catch them or declare them in his throws clause. On the other hand, unchecked exceptions (those inheriting from RuntimeException) don&#8217;t force the programmer to do anything, as they are re-thrown transparently if the programmer decides not to catch them.</p>
<p>Most of the times, the client code can only report the exception to the end user somehow, and let her decide what to do. So, most of the times, the programmer can only throw the exception again until some class at the top of the call stack handles it. If the exception is a checked exception, then, the programmer needs to add it to the throws clause of the method, which makes it less easy to understand.</p>
<p>Therefore, it is much better to use unchecked exceptions.</p>
<h3>If necessary, translate checked exceptions as unchecked exceptions</h3>
<p>If you use a library that throws checked exceptions you can&#8217;t handle, you must propagate those exceptions. How can you use unchecked exceptions in such a situation? You just translate them.</p>
<p>To do so, create a new RuntimeException (or any subclass of it) and pass the checked exception as an argument to the constructor. Since Java 5, when, finally, the stack trace of the exception is printed, the stack trace of the nested exception is printed as well.</p>
<p>Example:</p>
<pre class="brush: java;">
try{
//some i/o code that throws IOException
}catch(IOException e){
throw new RuntimeException(&quot;I/O exception while doing whatever&quot;, e);
}</pre>
<h2>Use a single exception reporting point</h2>
<p>If you read until here, you know I don&#8217;t want you to swallow exceptions. Ok, so they&#8217;ll be propagated&#8230; to where?</p>
<p>If you are programming a web application, they could be propagated until they reach the application server. But then, the client, usually a human user, will receive an ugly HTTP 500 error page.</p>
<p>The solution is to use a single exception reporting point, a last resort before the exception hits the application server. That point should catch the exception, log it for debugging and diagnosis purposes and, usually, report that something went wrong to the client.</p>
<p>Reporting to the client, in the common case where the client is a human user, involves showing an error screen. If your client is another computer system (you are probably programming some kind of web services), then you need to translate the exception as an error response in whatever communication protocol you are using.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.agilogy.com/exceptions-best-practices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Lean Software Development: Avoiding wasting</title>
		<link>http://www.agilogy.com/eliminate-waste/</link>
		<comments>http://www.agilogy.com/eliminate-waste/#comments</comments>
		<pubDate>Thu, 16 Apr 2009 16:38:07 +0000</pubDate>
		<dc:creator>Jose Raya</dc:creator>
				<category><![CDATA[lean]]></category>

		<guid isPermaLink="false">http://www.agilogy.com/?p=237</guid>
		<description><![CDATA[<p>Sorry, this entry is only available in <a href="http://www.agilogy.es/feed/">Español</a>.</p>
]]></description>
			<content:encoded><![CDATA[<p>Sorry, this entry is only available in <a href="http://www.agilogy.es/feed/">Español</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.agilogy.com/eliminate-waste/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Lean Software Development</title>
		<link>http://www.agilogy.com/lean-software-development/</link>
		<comments>http://www.agilogy.com/lean-software-development/#comments</comments>
		<pubDate>Mon, 09 Mar 2009 08:27:12 +0000</pubDate>
		<dc:creator>Jose Raya</dc:creator>
				<category><![CDATA[lean]]></category>

		<guid isPermaLink="false">http://www.agilogy.com/?p=167</guid>
		<description><![CDATA[<p>Sorry, this entry is only available in <a href="http://www.agilogy.es/feed/">Español</a>.</p>
]]></description>
			<content:encoded><![CDATA[<p>Sorry, this entry is only available in <a href="http://www.agilogy.es/feed/">Español</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.agilogy.com/lean-software-development/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UML sequence diagrams: More frequent errors</title>
		<link>http://www.agilogy.com/diagrames-de-sequencia-uml-errades-mes-frequents/</link>
		<comments>http://www.agilogy.com/diagrames-de-sequencia-uml-errades-mes-frequents/#comments</comments>
		<pubDate>Wed, 21 Jan 2009 09:50:57 +0000</pubDate>
		<dc:creator>Jordi Pradel</dc:creator>
				<category><![CDATA[papers]]></category>
		<category><![CDATA[uml]]></category>

		<guid isPermaLink="false">http://www.agilogy.com/?p=114</guid>
		<description><![CDATA[<p>Sorry, this entry is only available in <a href="http://www.agilogy.cat/feed/">Català</a>.</p>
]]></description>
			<content:encoded><![CDATA[<p>Sorry, this entry is only available in <a href="http://www.agilogy.cat/feed/">Català</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.agilogy.com/diagrames-de-sequencia-uml-errades-mes-frequents/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UML Analysis: More frequent errors</title>
		<link>http://www.agilogy.com/analisi-uml-errades-mes-frequents/</link>
		<comments>http://www.agilogy.com/analisi-uml-errades-mes-frequents/#comments</comments>
		<pubDate>Wed, 26 Mar 2008 09:59:37 +0000</pubDate>
		<dc:creator>Jordi Pradel</dc:creator>
				<category><![CDATA[analysis]]></category>
		<category><![CDATA[uml]]></category>

		<guid isPermaLink="false">http://www.agilogy.com/analisi-uml-errades-mes-frequents</guid>
		<description><![CDATA[<p>Sorry, this entry is only available in <a href="http://www.agilogy.cat/feed/">Català</a>.</p>
]]></description>
			<content:encoded><![CDATA[<p>Sorry, this entry is only available in <a href="http://www.agilogy.cat/feed/">Català</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.agilogy.com/analisi-uml-errades-mes-frequents/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Database design: Value Object i Embedded Value</title>
		<link>http://www.agilogy.com/disseny-de-bases-de-dades-value-object-i-embedded-value/</link>
		<comments>http://www.agilogy.com/disseny-de-bases-de-dades-value-object-i-embedded-value/#comments</comments>
		<pubDate>Fri, 04 Jan 2008 13:23:27 +0000</pubDate>
		<dc:creator>Jordi Pradel</dc:creator>
				<category><![CDATA[design]]></category>
		<category><![CDATA[papers]]></category>

		<guid isPermaLink="false">http://www.agilogy.com/disseny-de-bases-de-dades-value-object-i-embedded-value</guid>
		<description><![CDATA[<p>Sorry, this entry is only available in <a href="http://www.agilogy.cat/feed/">Català</a>.</p>
]]></description>
			<content:encoded><![CDATA[<p>Sorry, this entry is only available in <a href="http://www.agilogy.cat/feed/">Català</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.agilogy.com/disseny-de-bases-de-dades-value-object-i-embedded-value/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
