<?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>GridPulse &#187; Development</title>
	<atom:link href="http://www.gridpulse.com/category/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.gridpulse.com</link>
	<description>as stimulating as black coffee and just as hard to sleep after.</description>
	<lastBuildDate>Fri, 14 May 2010 19:19:38 +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>Why releasing new versions is like shaving</title>
		<link>http://www.gridpulse.com/2010/04/21/why-releasing-new-versions-is-like-shaving/</link>
		<comments>http://www.gridpulse.com/2010/04/21/why-releasing-new-versions-is-like-shaving/#comments</comments>
		<pubDate>Wed, 21 Apr 2010 21:59:59 +0000</pubDate>
		<dc:creator>Bogdan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Productivity]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Working smart]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[releasing]]></category>
		<category><![CDATA[velocity]]></category>

		<guid isPermaLink="false">http://www.gridpulse.com/?p=243</guid>
		<description><![CDATA[Some time ago I was talking about the similarities of shaving and product releasing, especially the impact of release frequency on velocity. Returning to this idea, i realized that,increased releasing or increased deployment frequency has a beneficial effect on the overall velocity and quality of the release or deployment, while also improving team morale. Because [...]]]></description>
			<content:encoded><![CDATA[<p>Some time ago I was talking about the similarities of shaving and product releasing, especially the impact of release frequency on velocity.</p>
<p><a href="http://twitter.com/gridpulse/status/3513151986"><img src="http://www.gridpulse.com/wp-content/uploads/2010/04/releasing_shaving1.jpg" alt="" title="Releasing is like shaving" width="400" height="194" class="alignnone size-full wp-image-491" /></a></p>
<p>Returning to this idea, i realized that,<b>increased releasing or increased deployment frequency has a beneficial effect on the overall velocity and quality of the release or deployment, while also improving team morale</b>.</p>
<p>Because of this, I&#8217;ve been trying to create and respect strict deployment schedules, matching every development or bug-fixing iteration, namely(and usually)&#8230; every week. </p>
<p>It&#8217;s hard at the beginning and the first 3-4 iterations are tough (testing and deployment continues through the night because of inefficient planning and scoping) but after the team gets into the rhythm releasing and deployment becomes a trivial and actually fun activity.</p>
<p>Frequent release and deployment cycles also have a tendency of raising customer trust levels and wining some points for the development team, so release fast, release often, release good&#8230; and you&#8217;ll constantly get better results.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gridpulse.com/2010/04/21/why-releasing-new-versions-is-like-shaving/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The uncertain future of GUtil!</title>
		<link>http://www.gridpulse.com/2010/02/22/the-uncertain-future-of-gutil/</link>
		<comments>http://www.gridpulse.com/2010/02/22/the-uncertain-future-of-gutil/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 21:36:10 +0000</pubDate>
		<dc:creator>Bogdan</dc:creator>
				<category><![CDATA[GUtil]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://www.gridpulse.com/?p=323</guid>
		<description><![CDATA[I think that it&#8217;s about time for this post so here goes. Brief history GUtil! was born sometime in 2006 and I released the first version (GUtil! 0.4.9.5) on November 3rd 2006, for Firefox 1.5. At first it was something that I used to speed up access to the Google tools that I was using [...]]]></description>
			<content:encoded><![CDATA[<p>I think that it&#8217;s about time for this post so here goes.</p>
<p><b><em>Brief history</em></b><br />
GUtil! was born sometime in 2006 and I released the first version (GUtil! 0.4.9.5) on November 3rd 2006, for Firefox 1.5.</p>
<p>At first it was something that I used to speed up access to the Google tools that I was using so I only had a couple of links. Then somebody asked for it and also asked me to add some more things that he used. So I did. And I published it. And more people wanted it. That is all.</p>
<p><b><em>Current status</em></b><br />
I haven&#8217;t touched the code since July 30, 2009.<b>I&#8217;m not using it anymore.</b> I have restricted my Google usage to Google apps, Picasa and Reader.I don&#8217;t care about anything else, nor do I have the time to care about anything else.</p>
<p>Some statistics:<br />
- GUtil! <b>has been downloaded 240,651 times</b><br />
- GUtil! <b>is part of 198 collections on AMO</b><br />
- GUtil! <b>has 8680 active daily users</b> down from <b>more than 12000</b></p>
<p><b><em>Future</em></b><br />
Well, here comes the bad news.<br />
I&#8217;m not updating it anymore. I don&#8217;t have the time, the patience or the interest to update GUtil! anymore.</p>
<p>If you want to work on it, it&#8217;s always been open so go get the source and have a whack!<br />
<a href="http://code.google.com/p/gutil-firefox-extension/">http://code.google.com/p/gutil-firefox-extension/</a></p>
<p>All the best to whoever wants to continue with GUtil!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gridpulse.com/2010/02/22/the-uncertain-future-of-gutil/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Get all the types contained in all the assemblies loaded, filtered by namespace</title>
		<link>http://www.gridpulse.com/2009/10/29/get-all-the-types-contained-in-all-the-assemblies-loaded-filtered-by-namespace/</link>
		<comments>http://www.gridpulse.com/2009/10/29/get-all-the-types-contained-in-all-the-assemblies-loaded-filtered-by-namespace/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 09:05:49 +0000</pubDate>
		<dc:creator>Bogdan</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Unit testing]]></category>
		<category><![CDATA[AppDomain]]></category>
		<category><![CDATA[Assembly]]></category>
		<category><![CDATA[NUnit]]></category>

		<guid isPermaLink="false">http://www.gridpulse.com/?p=268</guid>
		<description><![CDATA[This quick snippet will give you all the types declared in all the assemblies loaded, filtered by namespace. List types = new List(); Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies(); foreach (Assembly asm in assemblies) { IEnumerable asmTypes = from t in asm.GetTypes() where t.IsClass &#038;&#038; (t.Namespace != null &#038;&#038; t.Namespace.StartsWith(targetNamespace)) select t; types.AddRange(asmTypes); } I actually got [...]]]></description>
			<content:encoded><![CDATA[<p>This quick snippet will give you all the types declared in all the assemblies loaded, filtered by namespace.</p>
<pre class="prettyprint">
List<Type> types = new List<Type>();
Assembly[] assemblies = AppDomain.CurrentDomain.GetAssemblies();

foreach (Assembly asm in assemblies)
{
        IEnumerable<Type> asmTypes = from t in asm.GetTypes()
              where t.IsClass
                &#038;&#038; (t.Namespace != null &#038;&#038; t.Namespace.StartsWith(targetNamespace))
              select t;
        types.AddRange(asmTypes);
}
</pre>
<p>I actually got to this point because of the way <a href="http://www.nunit.org/index.php">NUnit</a> wraps an assembly in another AppDomain. </p>
<p>The snippet need <strong>Linq </strong>so it’s for <strong>3.5 </strong>or newer.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gridpulse.com/2009/10/29/get-all-the-types-contained-in-all-the-assemblies-loaded-filtered-by-namespace/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to solve BindException: Address already in use: JVM_Bind in JBoss on Windows</title>
		<link>http://www.gridpulse.com/2009/10/28/how-to-solve-bindexception-address-already-in-use-jvm_bind-in-jboss-on-windows/</link>
		<comments>http://www.gridpulse.com/2009/10/28/how-to-solve-bindexception-address-already-in-use-jvm_bind-in-jboss-on-windows/#comments</comments>
		<pubDate>Wed, 28 Oct 2009 13:09:35 +0000</pubDate>
		<dc:creator>Bogdan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[BindException]]></category>
		<category><![CDATA[JBoss]]></category>

		<guid isPermaLink="false">http://www.gridpulse.com/2009/10/28/how-to-solve-bindexception-address-already-in-use-jvm_bind-in-jboss-on-windows/</guid>
		<description><![CDATA[&#160; Sometimes, you&#8217;re just having a wonderful day and suddenly the worst just happens: [ServiceController] Problem starting service jboss:service=Naming java.rmi.server.ExportException: Port already in use: 1198; nested exception is: java.net.BindException: Address already in use: JVM_Bind at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:243) ............ The regular solution is to check if the port is actually used. So fire up a command prompt [...]]]></description>
			<content:encoded><![CDATA[<p>&#160;</p>
<p>Sometimes, you&#8217;re just having a wonderful day and suddenly the worst just happens:</p>
<pre class="prettyprint">[ServiceController] Problem starting service jboss:service=Naming
    java.rmi.server.ExportException: Port already in use: 1198; nested exception is:
    java.net.BindException: Address already in use: JVM_Bind
    at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:243)
    ............</pre>
<p>The regular solution is to check if the port is actually used. So fire up a command prompt and <strong>netstat –aon</strong>.<strong> </strong></p>
<p>If you find the port, see what process is using it and kill it <img src='http://www.gridpulse.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> . </p>
<p>If you don’t see the port you can reserve it by following the information in <strong>KB812873 &#8211; <a title="http://support.microsoft.com/kb/812873" href="http://support.microsoft.com/kb/812873">http://support.microsoft.com/kb/812873</a>.</strong></p>
<p>My <strong>ReservedPorts</strong> entry contains:</p>
<blockquote>
<p>1433-1434<br />
    	<br />1097-1200<br />
    	<br />4543-4545</p>
</blockquote>
<p><strong></strong></p>
<p><strong>That should fix it. The bad thing is that it requires a restart.</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.gridpulse.com/2009/10/28/how-to-solve-bindexception-address-already-in-use-jvm_bind-in-jboss-on-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NanoDI, a small .NET Dependency Injection container</title>
		<link>http://www.gridpulse.com/2009/09/10/nanodi-a-small-net-dependency-injection-container/</link>
		<comments>http://www.gridpulse.com/2009/09/10/nanodi-a-small-net-dependency-injection-container/#comments</comments>
		<pubDate>Thu, 10 Sep 2009 23:50:19 +0000</pubDate>
		<dc:creator>Bogdan</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://www.gridpulse.com/?p=244</guid>
		<description><![CDATA[Some time ago I worked on some projects using ASP.NET that were mostly ASPX with some specialized ASHX&#8217;s (c# behind the scenes). The handlers just generated some graphs or exported Excel files, regular code monkey style, no architecture, no plan, just write it fast &#8211; quick dirty hack, quick buck &#8211; and I always thought [...]]]></description>
			<content:encoded><![CDATA[<p>Some time ago I worked on some projects using ASP.NET that were mostly ASPX with some specialized ASHX&#8217;s (c# behind the scenes).<br />
The handlers just generated some graphs or exported Excel files, regular code monkey style, no architecture, no plan, just write it fast &#8211; quick dirty hack, quick buck &#8211; and I always thought that these guys that accept .NET inferior stuff deserve what they get. </p>
<p>As time flew by, I started to get a taste of what .NET is all about, luring me to the dark side.</p>
<div style="border: 1px solid rgb(204, 204, 204); margin: 7px; padding: 5px; float: right;">
<img src="http://www.gridpulse.com/wp-content/uploads/2009/09/engine1.jpg" alt="engine1" title="engine1" width="216" height="325" class="aligncenter size-full wp-image-252" /></p>
<p><span style="font-size: 8px;">Photo by <a href="http://www.flickr.com/photos/b-tal/428943971/">B-tal</a></span>
</div>
<p>At the beginning I felt like &#8220;this is what evil must taste like&#8221;, but I quickly got accustomed to all the new things and now, I&#8217;m playing with .NET stuff again, mostly C#, trying to level my skills and having a lot of fun in the process. I built things like the quick and dirty <a href="http://www.gridpulse.com/2009/08/13/multi-font-viewer-on-xandertoolscom/" title="Multi font viewer">multi font viewer</a>, buggy and poor, mostly because nobody uses it.</p>
<p>Now, I wanted to start something bigger, and nicer (I won&#8217;t say what) and I felt that I needed to do it the right way, you know, MAINTAINABLE.<br />
I started looking for a DI container and I started with Spring and Pico. I&#8217;m pretty accustomed to pico and I&#8217;ve been using Spring since version 1 so I though I&#8217;d give them a try. Wrong, strange, alien, weird, huge, EVIL. </p>
<p>For what I wanted to do it really seemed this way. How&#8217;s about something that is 10 megs big because spring and dependencies is 7 megs big. And I&#8217;m not even going to use most of it, I just want some plain <a href="http://en.wikipedia.org/wiki/Dependency_injection">dependency injection</a> and maybe some tooling , like fast i18n.</p>
<p><b>Problem solved, evil destroyed</b><br />
I found the solution! Why not have some fun AND learn the inner workings of C# and .Net? Why not build my own?  So I did!</p>
<p><b>NanoDI</b> is a small dependency injection container and tooling for .NET C# projects that are small or that do not need the complexity of bigger IoC solutions.</p>
<p><b>NanoDI</b>&#8216;s goal is to be small, fast and clean.</p>
<p>Links:<br />
<a href="http://www.xandertools.com/nanodi"> Nano Dependency Injection home</a><br />
<a href="https://www.ohloh.net/p/nanodi"> NanoDI Ohloh.net project page</a><br />
<a href="http://code.google.com/p/nanodi/"> NanoDI Google Code project</a></p>
<p>The code is junky by my standards but I&#8217;m slowly refactoring as my c# skills get better. Next week I&#8217;m going to finish scoping and start working on proxies and interceptors. You can help too! </p>
<p>Have a taste, have fun!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gridpulse.com/2009/09/10/nanodi-a-small-net-dependency-injection-container/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Transactional unit tests that support scopes using JUnit and Spring</title>
		<link>http://www.gridpulse.com/2009/08/21/transactional-unit-tests-that-support-scopes-using-junit-and-spring/</link>
		<comments>http://www.gridpulse.com/2009/08/21/transactional-unit-tests-that-support-scopes-using-junit-and-spring/#comments</comments>
		<pubDate>Fri, 21 Aug 2009 16:45:31 +0000</pubDate>
		<dc:creator>Bogdan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Spring Framework]]></category>
		<category><![CDATA[Unit testing]]></category>

		<guid isPermaLink="false">http://www.gridpulse.com/?p=225</guid>
		<description><![CDATA[Most of the unit tests that you write don&#8217;t need support for transactions and scopes, but if you ever want to test your web frontend code properly you&#8217;ll hit into this one. Writing transactional unit test with JUnit, Spring and Hibernate is easy, what you want to do is: - Add a transaction management bean [...]]]></description>
			<content:encoded><![CDATA[<p>Most of the unit tests that you write don&#8217;t need support for transactions and scopes, but if you ever want to test  your web frontend code properly you&#8217;ll hit into this one. </p>
<p>Writing transactional unit test with JUnit, Spring and Hibernate is easy, what you want to do is:</p>
<p>- Add a transaction management bean in your test context:<br />
<code class="prettyprint"><br />
    &lt;bean id="transactionManager"<br />
          class="org.springframework.orm.hibernate3.HibernateTransactionManager"&gt;<br />
        &lt;property name="sessionFactory" ref="sessionFactory"/&gt;<br />
    &lt;/bean&gt;<br />
</code></p>
<p>- Make your test extend <a href="http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/test/context/junit4/AbstractTransactionalJUnit4SpringContextTests.html">AbstractTransactionalJUnit4SpringContextTests</a><br />
- Annotate you test class with <a href="http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/test/context/transaction/TransactionConfiguration.html">@TransactionConfiguration</a> and <a href="http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/transaction/annotation/Transactional.html">@Transactional</a></p>
<p>If your transaction demarcation is correct( surrounding your dao or service ) you should be done. This is the cleanest way that I found.</p>
<p>Everything until now is fine and dandy. The problem arises when one of the injected beans is bound to a scope. It can be any scope but for this example I&#8217;ll take the simplest scope &#8211; the &#8216;session&#8217; scope.</p>
<p>In a non-transactional situation this should be pretty straight forward, just implement <a href="http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/beans/factory/config/Scope.html">Scope</a> and using a <a href="http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/beans/factory/config/ConfigurableBeanFactory.html">ConfigurableBeanFactory</a> register it. The fact that we are extending <a href="http://static.springsource.org/spring/docs/2.5.x/api/org/springframework/test/context/junit4/AbstractTransactionalJUnit4SpringContextTests.html"AbstractTransactionalJUnit4SpringContextTests</a> and that our context is automatically created really kills the simple path. </p>
<p>You&#8217;ll get a <a href="http://static.springsource.org/spring/docs/2.0.x/api/org/springframework/beans/factory/BeanCreationException.html">org.springframework.beans.factory.BeanCreationException</a> with a nested &#8220;java.lang.IllegalStateException: No Scope registered for scope &#8216;session&#8217;&#8221;.</p>
<p>But do not despair, there is simple solution available and it&#8217;s called <a href="http://static.springsource.org/spring/docs/2.5.6/api/org/springframework/beans/factory/config/CustomScopeConfigurer.html">CustomScopeConfigurer</a>.</p>
<p>The fastest and cleanest way to use it is:<br />
- Create a simple class that will be used as our scope manager. Let&#8217;s call it <a href="http://code.google.com/p/alexandria-umbrella/source/browse/trunk/code/xandria-tooling/xandria-translator/xandria-translator-core/src/test/java/com/gridpulse/xandria/translator/MockSessionScope.java">MockSessionScope</a>.</p>
<p><img src="http://www.gridpulse.com/wp-content/uploads/2009/08/code.jpg" alt="code" title="code" width="630" height="378" class="aligncenter size-full wp-image-238" /></p>
<p>- In your test context, create a <a href="http://static.springsource.org/spring/docs/2.5.6/api/org/springframework/beans/factory/config/CustomScopeConfigurer.html">CustomScopeConfigurer</a> that will automatically register your scope on context creation:<br />
<code class="prettyprint"><br />
    &lt;bean class="org.springframework.beans.factory.config.CustomScopeConfigurer"&gt;<br />
        &lt;property name="scopes"&gt;<br />
            &lt;map&gt;<br />
                &lt;entry key="session"&gt;<br />
                    &lt;bean class="com.gridpulse.xandria.translator.MockSessionScope"/&gt;<br />
                &lt;/entry&gt;<br />
            &lt;/map&gt;<br />
        &lt;/property&gt;<br />
    &lt;/bean&gt;<br />
</code></p>
<p><b>Run your tests and you&#8217;re done!</b></p>
]]></content:encoded>
			<wfw:commentRss>http://www.gridpulse.com/2009/08/21/transactional-unit-tests-that-support-scopes-using-junit-and-spring/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Multi Font Viewer on xandertools.com</title>
		<link>http://www.gridpulse.com/2009/08/13/multi-font-viewer-on-xandertoolscom/</link>
		<comments>http://www.gridpulse.com/2009/08/13/multi-font-viewer-on-xandertoolscom/#comments</comments>
		<pubDate>Thu, 13 Aug 2009 19:04:15 +0000</pubDate>
		<dc:creator>Bogdan</dc:creator>
				<category><![CDATA[.NET]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[Open Source]]></category>

		<guid isPermaLink="false">http://www.gridpulse.com/?p=217</guid>
		<description><![CDATA[Being a software developer sometimes involves more than just coding. This time it was a logo and a splash screen I did a while ago and I had a problem &#8211; I couldn&#8217;t remember what font I used. Of course, having a lot of fonts installed made it a nightmare. I googled a bit and [...]]]></description>
			<content:encoded><![CDATA[<p>Being a software developer sometimes involves more than just coding.<br />
This time it was a logo and a splash screen I did a while ago and I had a problem &#8211; I couldn&#8217;t remember what font I used.</p>
<p>Of course, having a lot of fonts installed made it a nightmare. </p>
<p><a href="http://twitter.com/gridpulse/status/3271079360"><br />
<img src="http://www.gridpulse.com/wp-content/uploads/2009/08/twittshot.jpg" alt="twittshot" title="twittshot" class="aligncenter size-full wp-image-218" /><br />
</a></p>
<p>I googled a bit and found a lot of shareware that allowed me to view multiple fonts and compare. I didn&#8217;t use any of it. Instead I used a nice piece of software called <a href="http://opcion.sourceforge.net/">Opcion</a>.</p>
<p>It solved my problem, although it acted a little strange plus, it was Java. I can handle it because I&#8217;m a Java developer.. but can anybody else?</p>
<p>After finishing the work I decided I could do something about it. So I did.</p>
<p>It&#8217;s called <b>Multi Font Viewer</b> and it&#8217;s free.</p>
<p>You can download it from: <a href="http://xandertools.com/utilities/multifontviewer">the Multi Font Viewer page at xandertools.com</a>.</p>
<p>If you want to take a look at the code or contribute visit the <a href="http://code.google.com/p/multifontviewer/"> Multi Font Viewer Google Code project</a>.</p>
<p>Best of luck and happy fonting!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gridpulse.com/2009/08/13/multi-font-viewer-on-xandertoolscom/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>On refactoring and code reuse</title>
		<link>http://www.gridpulse.com/2009/06/22/on-refactoring-and-code-reuse/</link>
		<comments>http://www.gridpulse.com/2009/06/22/on-refactoring-and-code-reuse/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 18:30:47 +0000</pubDate>
		<dc:creator>Bogdan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.gridpulse.com/?p=205</guid>
		<description><![CDATA[Strolling through Google Reader, diagonally reading blog posts from the almost 1 hundred blogs that I tend to follow(1000+ unread ) a phrase jump started my brain. Not ever line of code can be reused. A lot of web development is about crafting a very specific solution. Localization, error handling, and coding conventions introduce challenges. [...]]]></description>
			<content:encoded><![CDATA[<p>Strolling through Google Reader, diagonally reading blog posts from the almost 1 hundred blogs that I tend to follow(1000+ unread <img src='http://www.gridpulse.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  ) a phrase jump started my brain.</p>
<blockquote><p>
Not ever line of code can be reused. A lot of web development is about crafting a very specific solution. Localization, error handling, and coding conventions introduce challenges.
</p></blockquote>
<p>This is part of a post from one of the Mozilla blogs that I&#8217;m following, namely the blog of <a href="http://ozten.com/psto/">Austin King</a>.</p>
<p>Now, this is as straight forward and clear as it is correct, <b>not ever line of code can be reused</b>. Putting it out of its initial context (web development that is) and bringing it into to context of enterprise applications it becomes pure evil, used as an excuse to re-invent a perfectly good wheel.</p>
<div style="border: 1px solid rgb(204, 204, 204); margin: 7px; padding: 5px; float: right;">
<img src="http://www.gridpulse.com/wp-content/uploads/2009/06/puzzle.gif" alt="Puzzle" title="Puzzle" class="aligncenter size-full wp-image-168" width="499" height="271"><br />
<span style="font-size: 8px;">Photo by <a href="http://www.flickr.com/photos/tcp909/132665279/">tcp909</a></span>
</div>
<p>Some advice:</p>
<ul>
<li> Reuse as much as you can, extracting recurring pieces of code as methods</li>
<li> If common code spawns between projects, always extract it in a common library</li>
<li> Run a copy-paste detector such as <a href="http://pmd.sourceforge.net/cpd.html">CPD</a>. Extract the code to methods.</li>
<li> Try to keep your methods under a fixed number of lines, let&#8217;s say 20. Doing this will force you to extract consistent pieces of code in separate methods, making them more re-usable</li>
<li>Try to maintain low cyclomatic complexity. Use a metrics package such as <a href="http://pmd.sourceforge.net/">PMD</a> or <a href="http://www.panopticode.org/">Panopticode</a>. Refactor complex methods to smaller, less complex chunks of reusable code.</li>
<li>If you have the feeling that it&#8217;s the second time you&#8217;ve written a piece of code, search for the first one, because it&#8217;s usually true.</li>
</ul>
<p>Now go and read a good book about this kind of stuff. I recommend <a href="http://oreilly.com/catalog/9780596519780/">The Productive Programmer</a> by <em>Neal Ford</em>. It&#8217;s an excellent book for beginners but don&#8217;t fear &#8211; it&#8217;s superb even if you&#8217;re an experienced developer, I caught some  nice Groovy tips that made the reading worth while, maybe you&#8217;ll find something interesting too.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gridpulse.com/2009/06/22/on-refactoring-and-code-reuse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Building software that speaks their language</title>
		<link>http://www.gridpulse.com/2009/04/10/building-software-that-speaks-their-language/</link>
		<comments>http://www.gridpulse.com/2009/04/10/building-software-that-speaks-their-language/#comments</comments>
		<pubDate>Fri, 10 Apr 2009 18:02:20 +0000</pubDate>
		<dc:creator>Bogdan</dc:creator>
				<category><![CDATA[Development]]></category>

		<guid isPermaLink="false">http://www.gridpulse.com/?p=107</guid>
		<description><![CDATA[I&#8217;ll share a secret with you: great software has great localization support. Frankly, this is not really a secret and it&#8217;s not just great for your users &#8211; having software that can be quickly adapted to any language or culture is a big plus for you and your company. Writing software that speaks their language [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ll share a secret with you: <b>great software has great <a href="http://en.wikipedia.org/wiki/Internationalization_and_localization">localization</a> support</b>. </p>
<p>Frankly, this is not really a secret and it&#8217;s not just great for your users &#8211; <b>having software that can be quickly adapted to any language or culture is a big plus</b> for you and your company.</p>
<p>Writing software that speaks their language is not hard these days, as most frameworks have this support built in, and <b>if your framework or technology doesn&#8217;t, it&#8217;s time to look for something new</b>. </p>
<div style="border: 1px solid rgb(204, 204, 204); margin: 7px; padding: 5px; text-align: center;">
<img src="http://www.gridpulse.com/wp-content/uploads/2009/04/intern.jpg" alt="Localization" title="36_256x256" height="200" class="alignnone size-full wp-image-122" />
</div>
<p>The infrastructure work of building an internationalizable and localizable product is usually already in place, but <b>using this support is up to you</b>. Most developers tend to treat this subject lightly, but I have found that the investment is well worth it.</p>
<p>Some tips for building applications that can be easily internationalized and localized:</p>
<ul>
<li> Make sure the technology that you want to use has support for easy internationalization and localization. If it doesn&#8217;t, and you still want to use it, think about the costs of developing localization support for that technology or framework. If the costs are higher than switching to another technology&#8230;switch</li>
<li> Localization doesn&#8217;t just mean translation. Consider the cultural aspects</li>
<li> Always consider <a href="http://en.wikipedia.org/wiki/Bi-directional_text">bi-directional text</a>, even if exporting to Arab or Asian countries is out of the question now, in the future&#8230;who knows. The Internet has made the world a small place</li>
<li>Never hard-code date or currency formats, it&#8217;s just plain wrong</li>
<li>Remember that different locales have different decimal and thousands separators, don&#8217;t hard-code these either</li>
<li>Keep your strings in an easy-to-translate format. Usually, <b>you&#8217;re not the one translating your application strings</b>, which means that your strings must be sent to a translator. If you keep your strings in a complicated format (or hard-coded in your product), <b>you&#8217;ll always loose time converting</b> your format to a translator readable (<em>normal human</em> readable) format. Either keep your strings in a simple format, such as a flat text file (think about the<em>.properties</em> file format used in Java applications) or use a special translated text management tool</li>
<li> If possible, don&#8217;t embed your translation file in the binary of your application so that new translations can be easily added without re-compiling and updating. <b>Doing translation update releases just annoys your user base</b></li>
<li><b>Have a native of the language and culture you are targeting use your application</b>. This way, you can be sure that no critical translation or cultural errors have slipped into your product. <b>Try not to use the same person that translated your text</b>, for easily understandable reasons.</li>
</ul>
<p>The process of localization may also <b>include presenting your application in a different way</b> or <b>highlighting different features</b> so your marketing approach could change(and it should change) also.</p>
<p>In the process of analyzing requirements and development, I usually try to learn the language and cultural habits myself (and I like to have my team do the same). You don&#8217;t have to learn the whole language, <b>you just have to learn the terms used in the specific domain you&#8217;re targeting</b>, as <b>this can have an important impact on requirements gathering and even on product development</b>, but more on this aspect in another post.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.gridpulse.com/2009/04/10/building-software-that-speaks-their-language/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>When importing large Oracle dumps&#8230;</title>
		<link>http://www.gridpulse.com/2009/02/06/when-importing-large-oracle-dumps/</link>
		<comments>http://www.gridpulse.com/2009/02/06/when-importing-large-oracle-dumps/#comments</comments>
		<pubDate>Fri, 06 Feb 2009 19:55:56 +0000</pubDate>
		<dc:creator>Bogdan</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[RDBMS]]></category>

		<guid isPermaLink="false">http://www.gridpulse.com/?p=99</guid>
		<description><![CDATA[Note to self and others! When importing large oracle dumps (size in GB&#8217;s): start early always disable ARCHIVELOG&#8230;.always set UNDO retention to a small value, let&#8217;s say 5 seconds get coffee&#8230; wait remember to enable ARCHIVELOG&#8230; when in production]]></description>
			<content:encoded><![CDATA[<p><strong>Note to self</strong> and <em>others</em>!<br />
When importing large oracle dumps (size in GB&#8217;s):</p>
<ul>
<li>start early</li>
<li>always disable ARCHIVELOG&#8230;.always</li>
<li>set UNDO retention to a small value, let&#8217;s say 5 seconds <img src='http://www.gridpulse.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </li>
<li>get coffee&#8230;</li>
<li>wait</li>
<li>remember to enable ARCHIVELOG&#8230; when in production</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.gridpulse.com/2009/02/06/when-importing-large-oracle-dumps/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
